Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bicho client cannot accept a bugzilla username which is an email #18

Open
thetuxracer opened this issue Dec 5, 2016 · 1 comment
Open

Comments

@thetuxracer
Copy link

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:[email protected]')
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://[email protected]:[email protected]')
URI::InvalidURIError: bad URI(is not URI?): https://[email protected]:[email protected]
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?

@thetuxracer
Copy link
Author

I have submitted a PR#19 for this.

@dmacvicar Please let me know if this suits you and whether it lacks something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant