mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-21 00:53:04 +02:00
bug #408 fixed, no session_regenerate_id on early PHP 7 versions
This commit is contained in:
@@ -945,7 +945,7 @@ function log_user($user_id, $remember_me)
|
||||
{ // make sure we clean any remember me ...
|
||||
setcookie($conf['remember_me_name'], '', 0, cookie_path(),ini_get('session.cookie_domain'));
|
||||
}
|
||||
if ( session_id()!="" )
|
||||
if ( session_id()!="" and (version_compare(PHP_VERSION, '7') <= 0 or version_compare(PHP_VERSION, '7.0.3') >= 0))
|
||||
{ // we regenerate the session for security reasons
|
||||
// see http://www.acros.si/papers/session_fixation.pdf
|
||||
session_regenerate_id(true);
|
||||
@@ -1597,4 +1597,4 @@ SELECT
|
||||
return create_user_auth_key($user_id, $user_status);
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user