-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Since the client uses the new_from_uri method call, it cannot handle percent encoded URIs. There is no call to unescape the username. Such a scheme is necessary because login id is an email. Refer [2]. The %40 is treated as part of the username and hence causes authentication error.
Declaring a URL with username:password@host scheme, where the username contains '@' also isnt accepted as the new_from_uri method fails on the split method. Refer [3]
Also unfortunate is the situation where the password contains a special character such as '@'.
[2] pry(main)> Bicho::Client.new('https://some%40redhat.com:password@bugzilla.redhat.com')
XMLRPC::FaultException: The username or password you entered is not valid.
from /home/thetuxracer/.rbenv/versions/2.3.1/lib/ruby/2.3.0/xmlrpc/client.rb:272:in `call'
[3] pry(main)> Bicho::Client.new('https://some@redhat.com:password@bugzilla.redhat.com')
URI::InvalidURIError: bad URI(is not URI?): https://some@redhat.com:password@bugzilla.redhat.com
from /home/thetuxracer/.rbenv/versions/2.3.1/lib/ruby/2.3.0/uri/rfc3986_parser.rb:67:in `split
I have a ready patch where I have fallen back on env variables to gather the username and password. I wanted to know, Duncan, if there is something obvious that I am missing? Is getting the credentials from the environment something that you see ok in your mind?