We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 367d0b3 + 6938601 commit 7004ec0Copy full SHA for 7004ec0
web/inc/main.php
@@ -59,10 +59,10 @@
59
exit;
60
}
61
62
-// Generate CSRF token
63
if (isset($_SESSION['user'])) {
64
if(!isset($_SESSION['token'])){
65
- $_SESSION['token'] = bin2hex(openssl_random_pseudo_bytes(16));
+ $token = uniqid(mt_rand(), true);
+ $_SESSION['token'] = $token;
66
67
68
web/login/index.php
@@ -126,7 +126,7 @@
126
127
128
// Generate CSRF token
129
-$_SESSION['token'] = bin2hex(openssl_random_pseudo_bytes(16)); // generate 32-character cryptographically secure token
+$_SESSION['token'] = md5(uniqid(mt_rand(), true));
130
131
require_once($_SERVER['DOCUMENT_ROOT'].'/inc/i18n/'.$_SESSION['language'].'.php');
132
require_once('../templates/header.html');
0 commit comments