<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/php-git.git/ext/standard/tests/serialize, branch master</title>
<subtitle>git.php.net: repository/php-src.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/'/>
<entry>
<title>Change the order of properties used for var_dump(), serialize(), comparison, etc.</title>
<updated>2021-03-01T10:29:49+00:00</updated>
<author>
<name>Dmitry Stogov</name>
<email>dmitry@zend.com</email>
</author>
<published>2021-02-26T16:27:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/commit/?id=72c3ededed45fc8f2ce6f98d11f82adedc5e9763'/>
<id>72c3ededed45fc8f2ce6f98d11f82adedc5e9763</id>
<content type='text'>
Now properties are ordered according to their layout in zend_object structure.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now properties are ordered according to their layout in zend_object structure.
</pre>
</div>
</content>
</entry>
<entry>
<title>Initialize property to UNDEF on unserialize overwrite</title>
<updated>2021-02-18T10:10:20+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2021-02-18T10:10:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/commit/?id=e03284739f4a3a1052dfe5497fbf06c1b206f895'/>
<id>e03284739f4a3a1052dfe5497fbf06c1b206f895</id>
<content type='text'>
The UNDEF marker here is important to prevent the creation of
a reference to the property currently being overwritten, which
would then leak.

This fixes oss-fuzz 6029559193534464, which was incorrectly
merged into oss-fuzz #30584 (which is reported at
https://github.com/google/oss-fuzz/issues/5211).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The UNDEF marker here is important to prevent the creation of
a reference to the property currently being overwritten, which
would then leak.

This fixes oss-fuzz 6029559193534464, which was incorrectly
merged into oss-fuzz #30584 (which is reported at
https://github.com/google/oss-fuzz/issues/5211).
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't use unmangled name if property not found</title>
<updated>2021-02-18T09:17:23+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2021-02-18T09:16:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/commit/?id=b87080f3c291c1b619d30ea9394a2eb893136006'/>
<id>b87080f3c291c1b619d30ea9394a2eb893136006</id>
<content type='text'>
This restores the previous behavior for this case. We'll continue
to use the mangled name, even if it does not correspond to a
declared property.

This also fixes an assertion failure for the case of property
overwrite, as the add_new was not guaranteed to be "new" previously.

Fixes oss-fuzz #31045.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This restores the previous behavior for this case. We'll continue
to use the mangled name, even if it does not correspond to a
declared property.

This also fixes an assertion failure for the case of property
overwrite, as the add_new was not guaranteed to be "new" previously.

Fixes oss-fuzz #31045.
</pre>
</div>
</content>
</entry>
<entry>
<title>Restrict allowed usages of $GLOBALS</title>
<updated>2021-01-06T11:46:24+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2020-12-02T16:47:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/commit/?id=3c68f38fdaec7a6f81f986a639bdd29716cf8f22'/>
<id>3c68f38fdaec7a6f81f986a639bdd29716cf8f22</id>
<content type='text'>
This restricts allowed usage of $GLOBALS, with the effect that
plain PHP arrays can no longer contain INDIRECT elements.

RFC: https://wiki.php.net/rfc/restrict_globals_usage

Closes GH-6487.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This restricts allowed usage of $GLOBALS, with the effect that
plain PHP arrays can no longer contain INDIRECT elements.

RFC: https://wiki.php.net/rfc/restrict_globals_usage

Closes GH-6487.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix use-after-scope in SplObjectStorage::unserialize()</title>
<updated>2021-01-05T11:44:17+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2021-01-05T11:43:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/commit/?id=d29d3a4bf69f0122b40ebafa376e2f34b20002f6'/>
<id>d29d3a4bf69f0122b40ebafa376e2f34b20002f6</id>
<content type='text'>
Introduced by the recent switch to a zend_object. Unserialize the
object into a tmp_var to avoid leaving behind a stack reference.

Fixes oss-fuzz #29271.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduced by the recent switch to a zend_object. Unserialize the
object into a tmp_var to avoid leaving behind a stack reference.

Fixes oss-fuzz #29271.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix edge case serializing __PHP_Incomplete_Class properties.</title>
<updated>2021-01-04T14:46:54+00:00</updated>
<author>
<name>Tyson Andre</name>
<email>tysonandre775@hotmail.com</email>
</author>
<published>2020-12-31T00:05:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/commit/?id=0d99628ac107c07c1fa2a1de29b1cd7d1e8e9c28'/>
<id>0d99628ac107c07c1fa2a1de29b1cd7d1e8e9c28</id>
<content type='text'>
This was using strcmp instead of zend_string_equals_literal.
As a result, the property count didn't match the number of properties
being serialized if properties started with
"__PHP_Incomplete_Class\0" (unlikely)

(before, `'O:8:"Missing_":1:{}'` would be serialized, which failed to
unserialize)

Everywhere else expects the MAGIC_MEMBER to match exactly,
and this should use zend_string_equals_literal as an example for other code.

This has used strcmp since 2004 in deb84befae4bbc3686a4f2ed82b04e2cabae5dc0

Closes GH-6555
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was using strcmp instead of zend_string_equals_literal.
As a result, the property count didn't match the number of properties
being serialized if properties started with
"__PHP_Incomplete_Class\0" (unlikely)

(before, `'O:8:"Missing_":1:{}'` would be serialized, which failed to
unserialize)

Everywhere else expects the MAGIC_MEMBER to match exactly,
and this should use zend_string_equals_literal as an example for other code.

This has used strcmp since 2004 in deb84befae4bbc3686a4f2ed82b04e2cabae5dc0

Closes GH-6555
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix another typed resource issue in unserialization</title>
<updated>2020-12-07T11:36:09+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2020-12-07T11:33:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/commit/?id=2d467abc46ec4ee97484d4e35909bed322600037'/>
<id>2d467abc46ec4ee97484d4e35909bed322600037</id>
<content type='text'>
We also need to discard old entries in the ref_props HT when values
are overwritten.

We should really forbid these kinds of overwrites. I believe they
can only occur in manually crafted serialization strings, and
cause so many problems...

Fixes oss-fuzz #28257.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We also need to discard old entries in the ref_props HT when values
are overwritten.

We should really forbid these kinds of overwrites. I believe they
can only occur in manually crafted serialization strings, and
cause so many problems...

Fixes oss-fuzz #28257.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix removal of type source during unserialization</title>
<updated>2020-12-04T11:56:05+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2020-12-04T11:56:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/commit/?id=77325c4448cff9d031b86c394932acb072e99bfe'/>
<id>77325c4448cff9d031b86c394932acb072e99bfe</id>
<content type='text'>
Missed a check for info in this code. Add it, and add an assertion
in type source removal to make it easier to catch this issue.

Fixes oss-fuzz #28208 and #28257.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Missed a check for info in this code. Add it, and add an assertion
in type source removal to make it easier to catch this issue.

Fixes oss-fuzz #28208 and #28257.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix another ref source management bug in unserialize</title>
<updated>2020-11-30T13:23:54+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2020-11-30T13:23:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/commit/?id=ed9532cff087a2b5db418b627471776897abe663'/>
<id>ed9532cff087a2b5db418b627471776897abe663</id>
<content type='text'>
When we overwrite an existing property during unserialization,
we also have to drop the ref source from it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we overwrite an existing property during unserialization,
we also have to drop the ref source from it.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'PHP-7.4' into PHP-8.0</title>
<updated>2020-11-25T16:24:49+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2020-11-25T16:24:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/php-git.git/commit/?id=217f247bb52bc64274d156c481b1b55c0590d803'/>
<id>217f247bb52bc64274d156c481b1b55c0590d803</id>
<content type='text'>
* PHP-7.4:
  Fixed bug #80411
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* PHP-7.4:
  Fixed bug #80411
</pre>
</div>
</content>
</entry>
</feed>
