Skip to content

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

@thetuxracer

Description

@thetuxracer

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions