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

feat: optimize parsing invalid chars #10

Merged

Conversation

cronik
Copy link
Contributor

@cronik cronik commented May 1, 2024

Image refs with many and long subdomains that have invalid characters in the image reference cause the regex engine to get bogged down and could become a regular expression denial of service attack.

For example docker.artifactory.us.foo.mycompany.com/bar/node?18 takes >4mins to parse and return as an invalid reference. With the updates in this change set the whole test set runs in 2ms.

Image refs with many and long subdomains that have invalid characters
in the image reference cause the regex engine to get bogged down
and could become a regular expression denial of service attack.

For example `docker.artifactory.us.foo.mycompany.com/bar/node?18` takes >4mins to parse and return as an invalid reference. With the updates in this change set the whole test set runs in 2ms.
@realityone
Copy link
Owner

Thanks for contributing.

I haven't worked with Python for a long time, so there might be a delay in updating to PyPI. Sorry for any inconvenience.

@realityone realityone merged commit 05e0371 into realityone:master May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants