Fix for "Broken or Risky Cryptographic Algorithm"

This commit is contained in:
myvesta 2021-08-14 22:36:07 +02:00
commit df11eaf33f
2 changed files with 6 additions and 4 deletions

View file

@ -66,9 +66,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;
}
}