Revert "Patch insecure CSRF token crypto vulnerability"

This commit is contained in:
dpeca 2017-04-19 20:32:22 +02:00 committed by GitHub
commit 6938601440
2 changed files with 3 additions and 3 deletions

View file

@ -59,10 +59,10 @@ if ((!isset($_SESSION['user'])) && (!defined('NO_AUTH_REQUIRED'))) {
exit;
}
// Generate CSRF token
if (isset($_SESSION['user'])) {
if(!isset($_SESSION['token'])){
$_SESSION['token'] = bin2hex(openssl_random_pseudo_bytes(16));
$token = uniqid(mt_rand(), true);
$_SESSION['token'] = $token;
}
}