diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-09-25 11:02:23 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-09-25 11:02:23 +0200 |
commit | b8ef7c35abd31666d9fb317db4b09a9eef0ede6c (patch) | |
tree | d7a724708c1403b769a429a858affdbfcf6f93d4 /ext/standard | |
parent | b100d51ba2668f9d3a051531575171a7184dc1c6 (diff) | |
download | php-git-b8ef7c35abd31666d9fb317db4b09a9eef0ede6c.tar.gz |
Increase serialize_lock while decoding session
Avoid leaking state between Serializable::unserialize() and
session_decode().
Diffstat (limited to 'ext/standard')
-rw-r--r-- | ext/standard/tests/serialize/bug70219_1.phpt | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/standard/tests/serialize/bug70219_1.phpt b/ext/standard/tests/serialize/bug70219_1.phpt index 6bbc593b34..6492a9a21e 100644 --- a/ext/standard/tests/serialize/bug70219_1.phpt +++ b/ext/standard/tests/serialize/bug70219_1.phpt @@ -18,6 +18,7 @@ class obj implements Serializable { } function unserialize($data) { session_decode($data); + return null; } } @@ -33,20 +34,18 @@ for ($i = 0; $i < 5; $i++) { var_dump($data); var_dump($_SESSION); ?> ---EXPECTF-- +--EXPECT-- array(2) { [0]=> - object(obj)#%d (1) { + object(obj)#1 (1) { ["data"]=> NULL } [1]=> - object(obj)#%d (1) { + object(obj)#2 (1) { ["data"]=> NULL } } -object(obj)#1 (1) { - ["data"]=> - NULL +array(0) { } |