Commit 5c043bb
committed
fix: replace polynomial regex with loop to resolve CodeQL ReDoS alert
The regex /\/+$/ used to strip trailing slashes from baseUrl was flagged
as a polynomial regular expression (ReDoS risk) by CodeQL. Replaced with
a simple while/endsWith/slice loop.1 parent 32bb821 commit 5c043bb
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
138 | 142 | | |
139 | 143 | | |
140 | 144 | | |
| |||
0 commit comments