Skip to content

fix: improve regex#6917

Merged
jeremylong merged 1 commit intomainfrom
scratch/fix-regex
Aug 26, 2024
Merged

fix: improve regex#6917
jeremylong merged 1 commit intomainfrom
scratch/fix-regex

Conversation

@jeremylong
Copy link
Copy Markdown
Collaborator

resolves https://github.com/jeremylong/DependencyCheck/security/code-scanning/14

Improves the regex so it does not use + and instead cap the version number at 100 digits.

@boring-cyborg boring-cyborg Bot added the core changes to core label Aug 25, 2024
Copy link
Copy Markdown
Collaborator

@aikebah aikebah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Though 100 digits feels a excessive for a version number, it would do the job of ReDOS prevention and still allow any reasonable previously matching version number to still match the RegEx.

@jeremylong
Copy link
Copy Markdown
Collaborator Author

I agree, 100 is excessive - but I've been burnt in the past by thinking there is no way we would see data of X characters.

@jeremylong jeremylong merged commit ccc151a into main Aug 26, 2024
@jeremylong jeremylong deleted the scratch/fix-regex branch August 26, 2024 11:53
@aikebah aikebah added this to the 10.0.4 milestone Aug 27, 2024
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

core changes to core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants