Commit 7d2cf3a
Assert content-type in XSS escape test
The existing XSS test only checked that the malicious payload was absent
from the response body, but never verified that the debug dashboard HTML
was actually rendered. Strengthen the assertion by branching on the
Content-Type header: when the response is HTML, confirm the dashboard is
present AND the payload is escaped; otherwise, confirm the delegated
response also does not contain the payload.
Addresses: #564 (comment)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 351e80d commit 7d2cf3a
1 file changed
Lines changed: 22 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
391 | 405 | | |
392 | 406 | | |
393 | 407 | | |
| |||
0 commit comments