mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Use htmlspecialchars() in example
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@298287 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
edc5639cd9
commit
b554ceabc5
1 changed files with 4 additions and 4 deletions
|
@ -198,11 +198,11 @@ if (!isset($_SERVER['PHP_AUTH_USER']) ||
|
|||
($_POST['SeenBefore'] == 1 && $_POST['OldAuth'] == $_SERVER['PHP_AUTH_USER'])) {
|
||||
authenticate();
|
||||
} else {
|
||||
echo "<p>Welcome: {$_SERVER['PHP_AUTH_USER']}<br />";
|
||||
echo "Old: {$_REQUEST['OldAuth']}";
|
||||
echo "<form action='{$_SERVER['PHP_SELF']}' METHOD='post'>\n";
|
||||
echo "<p>Welcome: " . htmlspecialchars($_SERVER['PHP_AUTH_USER']) . "<br />";
|
||||
echo "Old: " . htmlspecialchars($_REQUEST['OldAuth']);
|
||||
echo "<form action='' method='post'>\n";
|
||||
echo "<input type='hidden' name='SeenBefore' value='1' />\n";
|
||||
echo "<input type='hidden' name='OldAuth' value='{$_SERVER['PHP_AUTH_USER']}' />\n";
|
||||
echo "<input type='hidden' name='OldAuth' value=\"" . htmlspecialchars($_SERVER['PHP_AUTH_USER']) . "\" />\n";
|
||||
echo "<input type='submit' value='Re Authenticate' />\n";
|
||||
echo "</form></p>\n";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue