|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2013-08-19 03:17 UTC] php at tokumaru dot org
Description: ------------ In the case of session.use_strict_mode = On, a wrong session cookie is generated. Test script: --------------- <?php session_start(); $_SESSION['msg'] = 'hello'; echo 'session_id: ' . session_id(); Expected result: ---------------- A valid session cookie is generated. Actual result: -------------- A wrong session cookie is generated. The HTTP Response (Summary): HTTP/1.1 200 OK Set-Cookie: PHPSESSID=de3vsil36bfs3829rhnspq0oo7; path=/ Content-Length: 38 Content-Type: text/html session_id: ocjalnfd088dd90eppb1hr14h3 The Session File: $ sudo cat /tmp/sess_ocjalnfd088dd90eppb1hr14h3 msg|s:5:"hello"; PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 10:00:01 2025 UTC |
Fix for files save handler. I'll prepare fix for other save handlers if there is problem before 5.5.3 if it's possible. diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index e5733b4..004d9d4 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -338,13 +338,13 @@ PS_READ_FUNC(files) if (!PS(id)) { return FAILURE; } - php_session_reset_id(TSRMLS_C); if (PS(use_cookies)) { PS(send_cookie) = 1; } + php_session_reset_id(TSRMLS_C); } - ps_files_open(data, key TSRMLS_CC); + ps_files_open(data, PS(id) TSRMLS_CC); if (data->fd < 0) { return FAILURE; }