diff --git a/includes/functions.php b/includes/functions.php index 24da797f..66d87116 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -60,11 +60,7 @@ function safefilerewrite($fileName, $dataToSave) function ensureCSRFSessionToken() { if (empty($_SESSION['csrf_token'])) { - if (function_exists('mcrypt_create_iv')) { - $_SESSION['csrf_token'] = bin2hex(mcrypt_create_iv(32, MCRYPT_DEV_URANDOM)); - } else { - $_SESSION['csrf_token'] = bin2hex(openssl_random_pseudo_bytes(32)); - } + $_SESSION['csrf_token'] = bin2hex(random_bytes(32)); } }