com php-src: Merge branch 'PHP-5.5' into PHP-5.6: ext/session/session.c

From: Date: Wed, 15 Jan 2014 02:07:10 +0000
Subject: com php-src: Merge branch 'PHP-5.5' into PHP-5.6: ext/session/session.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-75623@lists.php.net to get a copy of this message
Commit: 167eaedcbdb494c87c4f83d2897a9fdb614e7062 Author: Yasuo Ohgaki <yohgaki@php.net> Wed, 15 Jan 2014 11:07:10 +0900 Parents: a5ee337156027e06966586984eff15e19efbf3cd f52c251f60c8c6d1bd01f3d87d69ed45f7a1bfa4 Branches: PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=167eaedcbdb494c87c4f83d2897a9fdb614e7062 Log: Merge branch 'PHP-5.5' into PHP-5.6 * PHP-5.5: Fixed session module is sending multiple set-cookie headers when session.use_strict_mode=1 Changed paths: MM ext/session/session.c Diff: diff --cc ext/session/session.c index 7a5254f,c1bdf83..cffdabb --- a/ext/session/session.c +++ b/ext/session/session.c @@@ -504,18 -507,14 +507,23 @@@ static void php_session_initialize(TSRM php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Failed to read session data: %s (path: %s)", PS(mod)->s_name, PS(save_path)); */ } + /* Set session ID if session read didn't activated session */ + if (PS(use_strict_mode) && PS(session_status) != php_session_active) { + php_session_reset_id(TSRMLS_C); + PS(session_status) = php_session_active; + } if (val) { + PHP_MD5_CTX context; + + /* Store read data's MD5 hash */ + PHP_MD5Init(&context); + PHP_MD5Update(&context, val, vallen); + PHP_MD5Final(PS(session_data_hash), &context); + php_session_decode(val, vallen TSRMLS_CC); - efree(val); + str_efree(val); + } else { + memset(PS(session_data_hash),'\0', 16); } if (!PS(use_cookies) && PS(send_cookie)) {

« previous php.cvs (#75623) next »