summaryrefslogtreecommitdiff
path: root/ext/session/mod_user.c
diff options
context:
space:
mode:
authorYasuo Ohgaki <yohgaki@php.net>2016-01-15 16:24:22 +0900
committerYasuo Ohgaki <yohgaki@php.net>2016-01-15 16:24:22 +0900
commit34ff7bbeb19b08dc1036836045e30d88599baafb (patch)
tree34b11d776672fcf4058885d89c0d026d8fe9f58e /ext/session/mod_user.c
parent132d919c8597b3a06b2f03d04d8d8df5614dba4c (diff)
parentbfb9307b2d679a91e138fd876880470ece60942b (diff)
downloadphp-git-34ff7bbeb19b08dc1036836045e30d88599baafb.tar.gz
Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6: Fixed bug #69111 (Crash in SessionHandler::read()). Made session save handler abuse much harder than before.
Diffstat (limited to 'ext/session/mod_user.c')
-rw-r--r--ext/session/mod_user.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c
index e6f162855a..c7c09ff781 100644
--- a/ext/session/mod_user.c
+++ b/ext/session/mod_user.c
@@ -85,7 +85,16 @@ PS_OPEN_FUNC(user)
ZVAL_STRING(&args[0], (char*)save_path);
ZVAL_STRING(&args[1], (char*)session_name);
- ps_call_handler(&PSF(open), 2, args, &retval);
+ zend_try {
+ ps_call_handler(&PSF(open), 2, args, &retval);
+ } zend_catch {
+ PS(session_status) = php_session_none;
+ if (!Z_ISUNDEF(retval)) {
+ zval_ptr_dtor(&retval);
+ }
+ zend_bailout();
+ } zend_end_try();
+
PS(mod_user_implemented) = 1;
FINISH;