Merge branch 'prasathmani:master' into 2fa

This commit is contained in:
ner0 2023-06-29 21:27:13 +01:00 committed by GitHub
commit 8d0b94f73e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -251,7 +251,11 @@ if (defined('FM_EMBED')) {
//Generating CSRF Token
if (empty($_SESSION['token'])) {
$_SESSION['token'] = bin2hex(random_bytes(32));
if (function_exists('random_bytes')) {
$_SESSION['token'] = bin2hex(random_bytes(32));
} else {
$_SESSION['token'] = bin2hex(openssl_random_pseudo_bytes(32));
}
}
if (empty($auth_users)) {