Commit c484fb2
committed
fix(examples): linear parseMailbox to avoid polynomial ReDoS
CodeQL flagged the angle-bracket regex in the feedback-worker example as a
polynomial regular expression on uncontrolled header input. Replace it with
an indexOf/slice parse that is linear in input length while preserving the
"Name <addr>" parsing behavior.1 parent e7996b6 commit c484fb2
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
301 | | - | |
302 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
303 | 308 | | |
304 | 309 | | |
305 | 310 | | |
| |||
0 commit comments