Commit 98a5134
committed
Fix Inefficient regular expression
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.
This replaces the problematic regular expression by a little parser that
checks for the same results as the regular expression.1 parent ea1089d commit 98a5134
File tree
1 file changed
+42
-8
lines changed- ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util
1 file changed
+42
-8
lines changedLines changed: 42 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
| |||
283 | 281 | | |
284 | 282 | | |
285 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
286 | 319 | | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
293 | 327 | | |
294 | 328 | | |
295 | 329 | | |
| |||
0 commit comments