optiopay / klar

Integration of Clair and Docker Registry
MIT License
506 stars 138 forks source link

#168 handle strange runes in auth url #170

Closed Pilzington closed 2 years ago

Pilzington commented 4 years ago

In Issue #168 I mentioned that I always got a 400 error when trying to connect to a certain registry.

After some digging I found out that the url to authenticate klar had an space which was not encode correctly by klar. Here is the code I used to make it work.

The url looked like this with "Docker Registry" in the service variable. The space triggered the error.

"https://example.com/auth?service=Docker Registry&scope=repository:hello/world:pull&account=example-user"