Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1328082 - Can't search external registry if username/password contains special char
Summary: Can't search external registry if username/password contains special char
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Container Management
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Daniel Lobato Garcia
QA Contact: Katello QA List
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-18 12:03 UTC by Lukas Pramuk
Modified: 2021-03-11 14:33 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-04 17:58:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 14704 0 None None None 2016-04-22 16:30:40 UTC

Description Lukas Pramuk 2016-04-18 12:03:00 UTC
Description of problem:
Can't search a image/tag using an external registry if username/password contains special char. It seems that username/password is not URLEncoded when used.

Version-Release number of selected component (if applicable):
@Sat6.2.0-Beta-Snap8

How reproducible:
always

Steps to Reproduce:
1. Create an external registry using URL https://registry.access.redhat.com and username/password containing special char, e.g. '@', '%'
2. Go to New Container wizard and select an already created docker compute resouce
3. In the next step select the "External Registry" tab, search for 'rhel'

(x) Oops, we're sorry but something went wrong bad component(expected userinfo component or user component): q%r

Actual results:
No search results, an error message pop-up shown

Expected results:
Search results without errors.

Additional info:

2016-04-18 08:00:49 [app] [I] Started GET "/image_search/2/search_repository?search=rhel&registry_id=2" for <CLIENT_IP> at 2016-04-18 08:00:49 -0400
2016-04-18 08:00:49 [app] [I] Processing by ImageSearchController#search_repository as TEXT
2016-04-18 08:00:49 [app] [I]   Parameters: {"search"=>"rhel", "registry_id"=>"2", "id"=>"2"}
2016-04-18 08:00:49 [app] [W] Action failed
 | URI::InvalidComponentError: bad component(expected userinfo component or user component): q%r
 | /opt/rh/rh-ruby22/root/usr/share/ruby/uri/generic.rb:400:in `check_user'
 | /opt/rh/rh-ruby22/root/usr/share/ruby/uri/generic.rb:472:in `user='
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_docker-2.0.1.4/app/models/service/registry_api.rb:9:in `initialize'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_docker-2.0.1.4/app/controllers/image_search_controller.rb:110:in `new'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_docker-2.0.1.4/app/controllers/image_search_controller.rb:110:in `registry_search_image'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_docker-2.0.1.4/app/controllers/image_search_controller.rb:42:in `block in search_repository'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_docker-2.0.1.4/app/controllers/image_search_controller.rb:56:in `catch_network_errors'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_docker-2.0.1.4/app/controllers/image_search_controller.rb:38:in `search_repository'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/abstract_controller/base.rb:189:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/rendering.rb:10:in `process_action'
 ...
2016-04-18 08:00:49 [app] [I]   Rendered common/500.html.erb (1.1ms)
2016-04-18 08:00:49 [app] [I] Completed 500 Internal Server Error in 12ms (Views: 1.5ms | ActiveRecord: 2.4ms)

Comment 1 Lukas Pramuk 2016-04-18 12:06:59 UTC
the same but for password field:

(x) Oops, we're sorry but something went wrong password component depends user component

2016-04-18 08:04:01 [app] [I] Started GET "/image_search/2/search_repository?search=rhel&registry_id=2" for <CLIENT_IP> at 2016-04-18 08:04:01 -0400
2016-04-18 08:04:01 [app] [I] Processing by ImageSearchController#search_repository as TEXT
2016-04-18 08:04:01 [app] [I]   Parameters: {"search"=>"rhel", "registry_id"=>"2", "id"=>"2"}
2016-04-18 08:04:01 [app] [W] Action failed
 | URI::InvalidURIError: password component depends user component
 | /opt/rh/rh-ruby22/root/usr/share/ruby/uri/generic.rb:423:in `check_password'
 | /opt/rh/rh-ruby22/root/usr/share/ruby/uri/generic.rb:501:in `password='
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_docker-2.0.1.4/app/models/service/registry_api.rb:10:in `initialize'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_docker-2.0.1.4/app/controllers/image_search_controller.rb:110:in `new'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_docker-2.0.1.4/app/controllers/image_search_controller.rb:110:in `registry_search_image'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_docker-2.0.1.4/app/controllers/image_search_controller.rb:42:in `block in search_repository'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_docker-2.0.1.4/app/controllers/image_search_controller.rb:56:in `catch_network_errors'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_docker-2.0.1.4/app/controllers/image_search_controller.rb:38:in `search_repository'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/abstract_controller/base.rb:189:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/rendering.rb:10:in `process_action'
...
2016-04-18 08:04:01 [app] [I]   Rendered common/500.html.erb (1.2ms)
2016-04-18 08:04:01 [app] [I] Completed 500 Internal Server Error in 10ms (Views: 1.7ms | ActiveRecord: 1.7ms)

Comment 3 Daniel Lobato Garcia 2016-04-19 08:50:59 UTC
Created redmine issue http://projects.theforeman.org/issues/14704 from this bug

Comment 5 Bryan Kearney 2018-09-04 17:58:17 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the foreseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.


Note You need to log in before you can comment on or make changes to this bug.