christian-korneck / docker-pushrm

"Docker Push Readme" - a Docker CLI plugin to update container repo docs
MIT License
139 stars 4 forks source link

400 bad request when trying to login with special chars (dockerhub) #11

Closed rfvgyhn closed 4 years ago

rfvgyhn commented 4 years ago

Describe the problem or bug I was getting a 400 result when trying to login to docker hub before changing my password. It was a randomly generated password so I don't remember it exactly, but it did have the following special chars

" ' : ` \ < >

After I changed my password, pushrm worked as expected.

docker-pushrm version 1.5.0

Docker CLI version and platform 19.03.13-ce Arch Linux

debug output

DEBU Dockerhub.Pushrm called
DEBU retrieve Dockerhub jwt token, status code: 400
DEBU error retrieving Dockerhub jwt token, bad status code for response: 400 Bad Request
ERRO error trying to get a JWT token from Dockerhub for the stored Docker login. Try "docker logout" and "docker login". Also, if you have 2FA auth enabled in Dockerhub you'll need to disable it for this tool to work. (This is an unfortunate Dockerhub limitation, see docs for more infos).

Additional context I was able to get a successful response with the old password via calling the API myself (with httpie). Perhaps some chars aren't being escaped properly?

christian-korneck commented 4 years ago

hi @Rfvgyhn , thanks for reporting this bug. Fixed in v1.5.1.