Skip to content

Commit 53c6881

Browse files
committed
UPGRADING note about bug #67072
1 parent c2acdbd commit 53c6881

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

UPGRADING

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,9 @@ PHP 5.4 UPGRADE NOTES
350350
- Since 5.4.7, ctor is always called when new user stream wrapper object is created.
351351
Before, it was called only when stream_open was called.
352352

353+
- Manipulated serialization strings for objects implementing Serializable by
354+
replacing "C:" with "O:" at the start will now produce an error.
355+
353356
==============================
354357
5. Changes to existing classes
355358
==============================

UPGRADING.INTERNALS

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ UPGRADE NOTES - PHP X.Y
1212
g. leak_variable
1313
h. API Signature changes
1414
i. new TSRM function expand_filepath_with_mode
15+
j. unserialization of manipulated object strings
1516

1617
2. Build system changes
1718
a. Unix build system changes
@@ -189,6 +190,20 @@ it increments the refcounts of those objects instead.
189190
PHPAPI char *expand_filepath_with_mode(const char *filepath, char *real_path, const char *relative_to, size_t relative_to_len, int realpath_mode TSRMLS_DC);
190191
expand_filepath_with_mode lets define how realpath will behave, using one of the existing mode: CWD_EXPAND , CWD_FILEPATH or CWD_REALPATH.
191192

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

0 commit comments

Comments
 (0)