mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 10:37:39 -07:00
Fix for "Broken or Risky Cryptographic Algorithm"
This commit is contained in:
parent
6fdfef4e88
commit
2fc0dc34fe
1 changed files with 3 additions and 2 deletions
|
@ -58,9 +58,10 @@ if ((!isset($_SESSION['user'])) && (!defined('NO_AUTH_REQUIRED'))) {
|
|||
exit;
|
||||
}
|
||||
|
||||
// Generate CSRF Token
|
||||
if (isset($_SESSION['user'])) {
|
||||
if(!isset($_SESSION['token'])){
|
||||
$token = uniqid(mt_rand(), true);
|
||||
if (!isset($_SESSION['token'])){
|
||||
$token = bin2hex(file_get_contents('/dev/urandom', false, null, 0, 16));
|
||||
$_SESSION['token'] = $token;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue