mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 05:44:07 -07:00
Fix cryptographically insecure CSRF tokens
This commit is contained in:
parent
2a27966a84
commit
2f5c7a10b7
1 changed files with 1 additions and 1 deletions
|
@ -126,7 +126,7 @@ if (empty($_SESSION['language'])) {
|
|||
}
|
||||
|
||||
// Generate CSRF token
|
||||
$_SESSION['token'] = md5(uniqid(mt_rand(), true));
|
||||
$_SESSION['token'] = bin2hex(openssl_random_pseudo_bytes(16)); // generate 32-character cryptographically secure token
|
||||
|
||||
require_once($_SERVER['DOCUMENT_ROOT'].'/inc/i18n/'.$_SESSION['language'].'.php');
|
||||
require_once('../templates/header.html');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue