don't write the csrf token field to the output buffer

but return and echo it
This commit is contained in:
glaszig
2019-08-01 13:03:59 +02:00
parent 6f1ae104f3
commit 0a255e8b49
5 changed files with 5 additions and 5 deletions

View File

@@ -70,7 +70,7 @@ function ensureCSRFSessionToken()
function CSRFToken()
{
$token = htmlspecialchars($_SESSION['csrf_token']);
echo '<input id="csrf_token" type="hidden" name="csrf_token" value="' . $token . '">';
return '<input id="csrf_token" type="hidden" name="csrf_token" value="' . $token . '">';
}
/**