Commit 1db2df5
committed
fix(common): simplify class name pattern to avoid backtracking
Replace the nested-quantifier regex with a single linear character class.
SonarCloud flagged the previous pattern for possible catastrophic
backtracking on large inputs. The character class rejects the same malformed
entries (paths, URL-encoded spaces, synthetic lambda names) without the
backtracking risk.1 parent 6f64a17 commit 1db2df5
1 file changed
Lines changed: 6 additions & 6 deletions
File tree
- powertools-common/src/main/java/software/amazon/lambda/powertools/common/internal
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
0 commit comments