Skip to content

Commit b93d040

Browse files
committed
UPGRADING note about bug #67072
1 parent f09f7f2 commit b93d040

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

UPGRADING

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ PHP 5.6 UPGRADE NOTES
235235
. pg_send_query()
236236
. pg_send_query_params()
237237

238+
- unserialize:
239+
Manipulated serialization strings for objects implementing Serializable by
240+
replacing "C:" with "O:" at the start will now produce an error.
241+
238242
========================================
239243
5. New Functions
240244
========================================

UPGRADING.INTERNALS

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ UPGRADE NOTES - PHP X.Y
1212
g. Additional str_* APIs
1313
h. Addition of zend_hash_reindex
1414
i. Addition of zend_hash_splice
15+
j. An additional parameter is sent to Countable::count()
16+
k. Unserialization of manipulated object strings
1517

1618
2. Build system changes
1719
a. Unix build system changes
@@ -189,6 +191,21 @@ UPGRADE NOTES - PHP X.Y
189191
fail. Extensions which implement Countable internally, need to accept one
190192
optional long as parameter.
191193

194+
k. Unserialization of manipulated object strings
195+
196+
Strings requiring unserialization of objects are now explicitly checked
197+
whether the object they contain implements the Serializable interface.
198+
This solves the situation where manipulated strings could be passed for
199+
objects using Serializable to disallow serialization. An object
200+
implementing Serializable will always start with "C:" in the serialized
201+
string, all other objects are represented with starting "O:". Objects
202+
implementing Serializable to disable serialization using
203+
zend_class_unserialize_deny and zend_class_serialize_deny, when
204+
instantiated from the serializer with a manipulated "O:" string at the
205+
start, will most likely be defectively initialized. This is now
206+
fixed at the appropriate place by checking for the presence of the
207+
serialize callback in the class entry.
208+
192209
========================
193210
2. Build system changes
194211
========================

0 commit comments

Comments
 (0)