Browse Source

generate a new csrf token for each request

pull/356/head
glaszig 3 years ago
parent
commit
964dc00fab
  1. 4
      includes/functions.php

4
includes/functions.php

@ -59,9 +59,7 @@ function safefilerewrite($fileName, $dataToSave)
*/
function ensureCSRFSessionToken()
{
if (empty($_SESSION['csrf_token'])) {
$_SESSION['csrf_token'] = bin2hex(random_bytes(32));
}
$_SESSION['csrf_token'] = bin2hex(random_bytes(32));
}
/**

Loading…
Cancel
Save