Commit d673ffd
committed
fix: allowlist path traversal guard, MIME validation, and XSS test robustness
- Add strpos '..' guard after redirect URL allowlist to block same-origin
path traversal (a/../syslog_alerts.php?action=purge bypassed allowlist)
- Add urldecode() before allowlist so percent-encoded characters are
normalised before pattern matching
- Add mime_content_type() check on uploaded XML files to reject non-XML
content before file_get_contents; fopen guard already present
- issue252_xss_output_test: replace file_get_contents with
php_strip_whitespace() for PHP files so commented-out html_escape()
calls cannot satisfy the assertion and mask a real XSS regression
- Partition pruning: break on invalid PARTITION_NAME instead of continue;
partitions are age-ordered so an invalid name means subsequent entries
cannot be safely dropped1 parent 6807d6b commit d673ffd
2 files changed
Lines changed: 42 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
185 | 189 | | |
186 | 190 | | |
187 | 191 | | |
188 | 192 | | |
189 | 193 | | |
190 | 194 | | |
191 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
192 | 200 | | |
193 | 201 | | |
194 | 202 | | |
| |||
216 | 224 | | |
217 | 225 | | |
218 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
219 | 236 | | |
220 | 237 | | |
221 | 238 | | |
| |||
433 | 450 | | |
434 | 451 | | |
435 | 452 | | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
441 | 458 | | |
442 | 459 | | |
443 | 460 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
12 | 23 | | |
13 | 24 | | |
14 | 25 | | |
| |||
25 | 36 | | |
26 | 37 | | |
27 | 38 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| |||
0 commit comments