mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
10 lines
327 B
PHP
10 lines
327 B
PHP
<?php
|
|
// XSS — negative fixture.
|
|
// Safe: uses htmlspecialchars() before output.
|
|
// Entry: renderPage($userInput) Cap: HTML_ESCAPE
|
|
// Expected verdict: NotConfirmed
|
|
|
|
function renderPage($userInput) {
|
|
$safe = htmlspecialchars($userInput, ENT_QUOTES, 'UTF-8');
|
|
echo '<html><body>' . $safe . '</body></html>' . "\n";
|
|
}
|