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

bug: Image get endpoint doesn't work when image name contains / #142

Open
VoVAllen opened this issue Dec 20, 2022 · 3 comments
Open

bug: Image get endpoint doesn't work when image name contains / #142

VoVAllen opened this issue Dec 20, 2022 · 3 comments

Comments

@VoVAllen
Copy link
Member

Description

We used authorized.GET("/:login_name/images/:name", WrapHandler(s.imageGet)) to register the imageGet handler. However, it's common for image name to be nvidia/cuda, which cannot be properly matched with /:name.

Note other restful API may also have similar problems, such as special characters in environment name or username.

cc @gaocegege

Reproduction

Additional Info


Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

@gaocegege
Copy link
Member

I think we have a escape here

/cc @kemingy

@VoVAllen
Copy link
Member Author

Not sure what's the best practice here. It's not common to escape / in the URL. Ref: https://stackoverflow.com/questions/48186760/rest-url-parameter-with-slashes#comment83377972_48193355

@gaocegege
Copy link
Member

Actually we should use digest, I think.

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

No branches or pull requests

2 participants