KEMBAR78
fix: Don't return JSON auth config for partial registry name match by kiview · Pull Request #6323 · testcontainers/testcontainers-java · GitHub
Skip to content

Conversation

@kiview
Copy link
Member

@kiview kiview commented Dec 23, 2022

With the current implementation, looking up the JSON file based auth config for an image registry.example.co/org/repo would return the auth config for https://registry.example.com (note the missing m from the TLD of the image name).

I can not think of a case where this is a desired behavior and in addition, this could be a potential part in a more sophisticated exploit chain (although I don't expect this to be likely for Testcontainers usage scenarios).

This implementation mitigates this issue by ensuring that the parsed repository name has to exactly match the string of the registry following the protocol (http(s)://).

@kiview kiview requested a review from a team December 23, 2022 14:32
@HofmeisterAn
Copy link
Contributor

/cc @cristianrgreco

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants