-
-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershacktoberfest
Description
- This part of the regular expression may cause exponential backtracking on strings starting with
'class'and containing many repetitions of'a'.
flourite/src/languages/java.ts
Line 15 in 313def7
{ pattern: /(public\s*)?class\s*(.*)+(\s)?\{/, type: 'keyword' },
According to the LGTM rule (click that link to see detailed rule):
Some regular expressions take a long time to match certain input strings to the point where the time it takes to match a string of length n is proportional to nk or even 2n. Such regular expressions can negatively affect performance, or even allow a malicious user to perform a Denial of Service ("DoS") attack by crafting an expensive input string for the regular expression to match.
See LGTM for detailed issue.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershacktoberfest