php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch write-short-circuit-fix for Session related Bug #67694Patch version 2014-08-23 14:18 UTC Return to Bug #67694 | Download this patchThis patch renders other patches obsolete Obsolete patches: Patch Revisions:Developer: tyrael@php.netdiff --git a/ext/session/session.c b/ext/session/session.c index d1a7a07..a59eeb5 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -519,6 +519,7 @@ static void php_session_initialize(TSRMLS_D) /* {{{ */ /* Store read data's MD5 hash */ PHP_MD5Init(&context); PHP_MD5Update(&context, val, vallen); + PHP_MD5Update(&context, PS(id), sizeof(PS(id))); PHP_MD5Final(PS(session_data_hash), &context); php_session_decode(val, vallen TSRMLS_CC); @@ -553,6 +554,7 @@ static void php_session_save_current_state(TSRMLS_D) /* {{{ */ /* Generate data's MD5 hash */ PHP_MD5Init(&context); PHP_MD5Update(&context, val, vallen); + PHP_MD5Update(&context, PS(id), sizeof(PS(id))); PHP_MD5Final(digest, &context); /* Write only when save is required */ if (memcmp(digest, PS(session_data_hash), 16)) { |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Thu Nov 21 13:01:29 2024 UTC |