mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 17:23:04 +02:00
fixes #2328 Piwigo 16 requires PHP 7.4, thus random_bytes is available
This commit is contained in:
@@ -54,17 +54,7 @@ if (isset($conf['session_save_handler'])
|
||||
*/
|
||||
function generate_key($size)
|
||||
{
|
||||
include_once(PHPWG_ROOT_PATH.'include/random_compat/random.php');
|
||||
|
||||
try
|
||||
{
|
||||
$bytes = random_bytes($size+10);
|
||||
}
|
||||
catch (Exception $ex)
|
||||
{
|
||||
include_once(PHPWG_ROOT_PATH.'include/srand.php');
|
||||
$bytes = secure_random_bytes($size+10);
|
||||
}
|
||||
$bytes = random_bytes($size+10);
|
||||
|
||||
return substr(
|
||||
str_replace(
|
||||
|
||||
Reference in New Issue
Block a user