Skip to content

Fix code scanning alert - Polynomial regular expression used on uncontrolled data#15

Merged
wtto00 merged 18 commits intomainfrom
dev
May 10, 2024
Merged

Fix code scanning alert - Polynomial regular expression used on uncontrolled data#15
wtto00 merged 18 commits intomainfrom
dev

Conversation

@wtto00
Copy link
Copy Markdown
Owner

@wtto00 wtto00 commented May 10, 2024

No description provided.

Comment thread src/util.ts

lines.forEach(function (line) {
const matches = line.match(/([\w/]+):\s(.*)/);
const matches = line.match(/(\w+):\s(.*)/);

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data

This [regular expression](1) that depends on [library input](2) may run slow on strings with many repetitions of 'a'.
@wtto00 wtto00 merged commit 4cf3b9f into main May 10, 2024
@wtto00
Copy link
Copy Markdown
Owner Author

wtto00 commented May 10, 2024

fix #14

@wtto00 wtto00 added chore Maintenance and removed chore Maintenance labels May 10, 2024
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.

2 participants