Skip to content

Fix regular expressions with DoS vulnerability#7097

Open
thomaslow wants to merge 1 commit into
kitodo:mainfrom
thomaslow:fix-polynomial-regular-expressions
Open

Fix regular expressions with DoS vulnerability#7097
thomaslow wants to merge 1 commit into
kitodo:mainfrom
thomaslow:fix-polynomial-regular-expressions

Conversation

@thomaslow

Copy link
Copy Markdown
Member

This PR fixes two regular expressions that are somewhat vulnerable to denial-of-service attacks. Users could enter input values that could cause high cpu load for these regular expressions due to O(n²) search complexity.

Related issue:

…pressions in FilterMenu and VariableReplacer.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@thomaslow thomaslow marked this pull request as ready for review June 25, 2026 09:16
@solth solth requested a review from BartChris June 25, 2026 09:20

@BartChris BartChris left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Took me some time to wrap my head around the string reversal strategy, but it looks good to me. Filtering still works.

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.

2 participants