mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-22 07:30:23 +00:00
generate a new csrf token for each request
This commit is contained in:
parent
7898dc24c8
commit
964dc00fab
1 changed files with 1 additions and 3 deletions
|
@ -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…
Reference in a new issue