Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix for "Broken or Risky Cryptographic Algorithm"
  • Loading branch information
anton-reutov committed Aug 16, 2021
1 parent 6fdfef4 commit 2fc0dc3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web/inc/main.php
Expand Up @@ -58,9 +58,10 @@
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;
}
}
Expand Down

0 comments on commit 2fc0dc3

Please sign in to comment.