com php-src: Session regenerate id seems to malfunction with 3rd party session handlers Fixed bug #71472 session_regenerate_id m alfunctions with
certain session handlers: ext/sess ion/session.c

From: Date: Thu, 28 Jan 2016 04:30:10 +0000
Subject: com php-src: Session regenerate id seems to malfunction with 3rd party session handlers Fixed bug #71472 session_regenerate_id m alfunctions with
certain session handlers: ext/sess ion/session.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-90765@lists.php.net to get a copy of this message
Commit: 46d4a371054f43fe8aeca14b83ba722adc84ac10 Author: Mikko <mikko@kuut.io> Tue, 26 Jan 2016 03:34:19 +0000 Committer: Yasuo Ohgaki <yohgaki@php.net> Thu, 28 Jan 2016 13:30:10 +0900 Parents: 8bc89942bbec5fbe419edc16a8966e0e57035283 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=46d4a371054f43fe8aeca14b83ba722adc84ac10 Log: Session regenerate id seems to malfunction with 3rd party session handlers Fixed bug #71472 session_regenerate_id malfunctions with certain session handlers Bugs: https://bugs.php.net/71472 Changed paths: M ext/session/session.c Diff: diff --git a/ext/session/session.c b/ext/session/session.c index 22a7ec1..d5e94b9 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -2102,15 +2102,18 @@ static PHP_FUNCTION(session_regenerate_id) PS(session_vars) = NULL; } zend_string_release(PS(id)); - PS(id) = PS(mod)->s_create_sid(&PS(mod_data)); - if (!PS(id)) { + PS(id) = NULL; + + if (PS(mod)->s_open(&PS(mod_data), PS(save_path), PS(session_name)) == FAILURE) { PS(session_status) = php_session_none; - php_error_docref(NULL, E_RECOVERABLE_ERROR, "Failed to create new session ID: %s (path: %s)", PS(mod)->s_name, PS(save_path)); + php_error_docref(NULL, E_RECOVERABLE_ERROR, "Failed to create(open) session ID: %s (path: %s)", PS(mod)->s_name, PS(save_path)); RETURN_FALSE; } - if (PS(mod)->s_open(&PS(mod_data), PS(save_path), PS(session_name)) == FAILURE) { + + PS(id) = PS(mod)->s_create_sid(&PS(mod_data)); + if (!PS(id)) { PS(session_status) = php_session_none; - php_error_docref(NULL, E_RECOVERABLE_ERROR, "Failed to create(open) session ID: %s (path: %s)", PS(mod)->s_name, PS(save_path)); + php_error_docref(NULL, E_RECOVERABLE_ERROR, "Failed to create new session ID: %s (path: %s)", PS(mod)->s_name, PS(save_path)); RETURN_FALSE; } if (PS(use_strict_mode) && PS(mod)->s_validate_sid &&

« previous php.cvs (#90765) next »