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®istry_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)
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®istry_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)
Created redmine issue http://projects.theforeman.org/issues/14704 from this bug
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.