Skip to content

Commit e5f04e5

Browse files
committed
MFH: fix bug #32944 (Disabling session.use_cookies doesn't prevent reading session cookies)
1 parent 30d0600 commit e5f04e5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ PHP 4 NEWS
1212
- Fixed bug #33019 (socket errors cause memory leaks in php_strerror()).
1313
(jwozniak23 at poczta dot onet dot pl, Tony).
1414
- Fixed bug #32974 (pcntl calls malloc() from a signal handler). (Wez)
15+
- Fixed bug #32944 (Disabling session.use_cookies doesn't prevent reading
16+
session cookies). (Jani, Tony)
1517
- Fixed bug #32936 (http redirects URLs are not checked for control chars). (Ilia)
1618
- Fixed bug #32932 (Oracle LDAP: ldap_get_entries invalid pointer). (Jani)
1719
- Fixed bug #32904 (pg_get_notify() ignores result_type parameter). (Tony)

ext/session/session.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ PHPAPI void php_session_start(TSRMLS_D)
10151015
*/
10161016

10171017
if (!PS(id)) {
1018-
if (zend_hash_find(&EG(symbol_table), "_COOKIE",
1018+
if (PS(use_cookies) && zend_hash_find(&EG(symbol_table), "_COOKIE",
10191019
sizeof("_COOKIE"), (void **) &data) == SUCCESS &&
10201020
Z_TYPE_PP(data) == IS_ARRAY &&
10211021
zend_hash_find(Z_ARRVAL_PP(data), PS(session_name),

0 commit comments

Comments
 (0)