Commit cc7fd42
committed
fix: Prevent stack overflow in hostname regex on large inputs
Replace nested capturing groups with non-capturing groups and use a
possessive quantifier on the outer repetition. This eliminates the
recursive-backtracking path Java's regex engine would otherwise
follow, addressing the SonarQube finding.1 parent 6d6276e commit cc7fd42
1 file changed
Lines changed: 2 additions & 2 deletions
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
| 72 | + | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
0 commit comments