Commit a46d5c8
committed
Fix possible injection of scriptlets requiring trust from non-trusted sources
Exception filters must never cause actual filters to be created.
Reported via email by "syvb":
> If you use both ~ and #@# in a filter rule, they cancel each other
> out and the filter still runs. But the check for trusted filter rules
> ignores all rules with #@#, even if they also use ~. So if you use
> both ~ and #@# in the same filter rule it will still run and can use
> trusted scriptlets, even when not in a trusted filter list.
>
> E.g. this filter runs JS on every page, even when not part of a
> trusted filter list:
>
> ~*#@#+js(trusted-create-html, body, <img src=x onerror="alert(document.domain)">)
>
> idk how big of a problem this is. but having ~ and #@# cancel each other out
> doesn't seem like intended behavior anyways?
>
> thanks
> [syvb]1 parent fe277a4 commit a46d5c8
3 files changed
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
| 315 | + | |
315 | 316 | | |
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
319 | 320 | | |
320 | 321 | | |
321 | | - | |
| 322 | + | |
| 323 | + | |
322 | 324 | | |
323 | 325 | | |
324 | 326 | | |
| |||
427 | 429 | | |
428 | 430 | | |
429 | 431 | | |
430 | | - | |
| 432 | + | |
431 | 433 | | |
432 | 434 | | |
433 | | - | |
| 435 | + | |
434 | 436 | | |
435 | 437 | | |
436 | 438 | | |
| |||
442 | 444 | | |
443 | 445 | | |
444 | 446 | | |
445 | | - | |
| 447 | + | |
446 | 448 | | |
447 | 449 | | |
448 | 450 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
356 | 355 | | |
357 | 356 | | |
358 | 357 | | |
| 358 | + | |
| 359 | + | |
359 | 360 | | |
360 | 361 | | |
361 | 362 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
| 164 | + | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
| |||
0 commit comments