diff options
author | Yasuo Ohgaki <yohgaki@php.net> | 2016-11-10 16:03:41 +0900 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2016-11-16 05:08:28 +0000 |
commit | 6230c2bad089bfbf518b64ef0868bf9d55a2145c (patch) | |
tree | a93a4ab30d0ff32c855a617326750da52afc08cd /ext/session/session.c | |
parent | d6c36e9af7ce43445b823e9a3b96868cf60fa7ed (diff) | |
download | php-git-6230c2bad089bfbf518b64ef0868bf9d55a2145c.tar.gz |
Fix Bug #73461
This patch disables any invalid save handler calls.
Diffstat (limited to 'ext/session/session.c')
-rw-r--r-- | ext/session/session.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/session/session.c b/ext/session/session.c index 5484390c7e..bbc531aa73 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -106,6 +106,7 @@ static inline void php_rinit_session_globals(void) /* {{{ */ /* TODO: These could be moved to MINIT and removed. These should be initialized by php_rshutdown_session_globals() always when execution is finished. */ PS(id) = NULL; PS(session_status) = php_session_none; + PS(in_save_handler) = 0; PS(mod_data) = NULL; PS(mod_user_is_open) = 0; PS(define_sid) = 1; @@ -2035,7 +2036,7 @@ static PHP_FUNCTION(session_create_id) } } - if (PS(session_status) == php_session_active) { + if (!PS(in_save_handler) && PS(session_status) == php_session_active) { int limit = 3; while (limit--) { new_id = PS(mod)->s_create_sid(&PS(mod_data)); |