Evedel/bow

Can't authenticate when using a password with percent symbol

hmcgonig opened this issue · 4 comments

Hey, first of all, thank you for writing this! The supply of bearer-auth supporting registry UIs is pretty lacking...

Okay, so I use the docker-auth project to handle token generation for me and the password for one of my users happens to have a "%" symbol in it. I found that I get an error when fetching things from this registry using the supplied password.

In this example my username/ password was testuser examplepassword!%#$#$%

Seems like usernames and passwords might just need to be URL encoded before sending the request. Alternatively, an even better solution would be to base64 encode the <username>:<password> and throw it into a header like so:

Authorization: Basic <base 64 encoded username password string>

[ Tue, 14 Feb 2017 22:05:40 UTC ][ L1 ] CheckManifests Daemon: started work
[ Tue, 14 Feb 2017 22:05:40 UTC ][ L3 ] parse https://testuser:examplepassword!%: invalid URL escape "%"
[ Tue, 14 Feb 2017 22:05:40 UTC ][ L3 ] CheckRepos Daemon: cannot recieve response from registry, stopping work

Hi!
Pleasure to hear, that it is useful =)
And thanks for the detailed description of the bug, I'm looking at it soon, probably in this weekend.

Hi again @hmcgonig!

Latest version on dockerhub should be fixed for now.

Awesome 👍