1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 17:08:14 +02:00
Commit Graph

104 Commits

Author SHA1 Message Date
Anatol Belski cccd538512 fix dir separator in test 2014-10-22 17:56:29 +02:00
Stanislav Malyshev 3eb679b952 Fixed bug #68044: Integer overflow in unserialize() (32-bits only) 2014-10-14 10:51:24 -07:00
Nikita Popov 75860fa8e1 Fix counting of "R:" references in serialize() 2014-09-24 12:06:19 +02:00
Nikita Popov ce99712315 Adjust serialization tests to not rely on auto-vivification order 2014-08-18 18:20:34 +02:00
Ferenc Kovacs c38ab260fe Revert "Add optional second arg to unserialize()"
This reverts commit cfd1045822.
2014-06-11 14:43:09 +02:00
Anatol Belski cfd20c90a5 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  refixed the test related to bug #67072
  Improved the fix for bug #67072, thanks Nikita
2014-04-18 15:17:12 +02:00
Anatol Belski c2acdbdd3d Improved the fix for bug #67072, thanks Nikita 2014-04-18 15:13:32 +02:00
Anatol Belski f9a1eab435 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  updated NEWS
  Fixed bug #67072 Echoing unserialized "SplFileObject" crash
2014-04-17 11:07:22 +02:00
Anatol Belski 5328d42899 Fixed bug #67072 Echoing unserialized "SplFileObject" crash
The actual issue lays in the unserializer code which doesn't honor
the unserialize callback. By contrast, the serialize callback is
respected. This leads to the situation that even if a class has
disabled the serialization explicitly, user could still construct
a vulnerable string which would result bad things when trying
to unserialize.

This conserns also the classes implementing Serializable as well
as some core classes disabling serialize/unserialize callbacks
explicitly (PDO, SimpleXML, SplFileInfo and co). As of now, the
flow is first to call the unserialize callback (if available),
then call __wakeup. If the unserialize callback returns with no
success, no object is instantiated. This makes the scheme used
by internal classes effective, to disable unserialize just assign
zend_class_unserialize_deny as callback.
2014-04-17 10:48:14 +02:00
Anatol Belski 696d286911 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fixed test
  And here is the real fix for #66124
  Fix for Bug #66124 (mysqli under mysqlnd loses precision when bind_param with 'i')
2013-11-21 21:29:35 +01:00
Anatol Belski 345032946c fixed test 2013-11-21 21:24:47 +01:00
Yasuo Ohgaki bf91f101a6 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  added a test to cover distinction between boolean return value of unserialize function and deserializing serialized boolean
2013-11-20 07:25:04 +09:00
Yasuo Ohgaki 0d558afc05 Fix WS in serialization_error_002.phpt 2013-11-20 07:17:53 +09:00
Aaron Hamid 050dd59c63 added a test to cover distinction between boolean return value of unserialize function and deserializing serialized boolean 2013-11-20 07:14:53 +09:00
Michael Wallner f72ed22749 Merge branch 'PHP-5.5'
* PHP-5.5:
  fix bug #64146 (serialize incorrectly saving objects when they are cloned)
2013-10-04 16:17:46 +02:00
Michael Wallner 8973390541 fix bug #64146 (serialize incorrectly saving objects when they are
cloned)
2013-10-04 16:16:15 +02:00
Michael Wallner 39022ba227 Merge branch 'PHP-5.5'
* PHP-5.5:
  such a weird hack probably helps in finding regressions in the future
2013-10-04 16:12:41 +02:00
Michael Wallner e8ae795529 such a weird hack probably helps in finding regressions in the future 2013-10-04 16:11:49 +02:00
Michael Wallner 73cd2e0ab1 Merge branch 'PHP-5.5'
* PHP-5.5:
  fix bug #65481 (shutdown segfault due to serialize)
2013-08-20 00:09:26 +02:00
Michael Wallner 1ac4d8f2c6 fix bug #65481 (shutdown segfault due to serialize) 2013-08-20 00:05:11 +02:00
Sara Golemon cfd1045822 Add optional second arg to unserialize()
Returns the number of bytes consumed by reference for
streaming unserialization.

Actual unserialization behavior is not modified at all.

The need for this came up while trying to parse SplDoublyLinkedList's
serialization format which uses a non-standard stream of serialized values.
2013-05-16 15:18:35 -07:00
Xinchen Hui f52b2e6a65 Fixed bug #64354 (Unserialize array of objects whose class can't be autoloaded fail)
about the __sleep one, since php_serialize_* are all void function,
so,,only check exception at the very begining
2013-03-09 23:00:58 +08:00
Xinchen Hui e081c55fb5 Merge branch 'PHP-5.3' into PHP-5.4 2012-10-10 10:31:31 +08:00
Xinchen Hui 610c7fbe7b Remove executable permission on phpt 2012-10-10 10:27:49 +08:00
Xinchen Hui 60a280936e Merge branch 'PHP-5.3' into PHP-5.4 2012-10-02 00:30:49 +08:00
Xinchen Hui af0c22537a Add test for #35895 2012-10-02 00:27:35 +08:00
Xinchen Hui 0b23da1c74 Fixed bug #62836 (Seg fault or broken object references on unserialize()) 2012-08-17 18:28:32 +08:00
Moriyoshi Koizumi 91e1df704e Fix bug #62373 (serialize() generates wrong reference to the object) 2012-06-25 19:14:19 +09:00
Moriyoshi Koizumi e427182279 Fix bug #62373 (serialize() generates wrong reference to the object) 2012-06-25 19:13:23 +09:00
Ferenc Kovacs c18a8bfe63 duh, I didn't wanted to commit that modification 2011-10-23 20:14:26 +00:00
Ferenc Kovacs a7a5776be7 fix test, it was fixed for trunk and 5.4 in r314005 2011-10-22 22:57:55 +00:00
Gustavo André dos Santos Lopes d3fdacb99f - Fixed #55798: serialize followed by unserialize with numeric object prop.
gives integer prop.
2011-09-28 14:47:42 +00:00
Gustavo André dos Santos Lopes ecfa660a82 - Fixed #55798: serialize followed by unserialize with numeric object prop.
gives integer prop.
2011-09-28 14:47:42 +00:00
Stanislav Malyshev 1c83f5e04c fix tests 2011-08-01 03:42:02 +00:00
Ilia Alshanetsky aa2ec7517e Fixed test 2011-06-28 23:47:05 +00:00
Ilia Alshanetsky b9ffb87960 Fixed test 2011-06-28 23:47:05 +00:00
Ilia Alshanetsky 80f46ca2c5 Fixed test to account for smaller default floating point # precision 2011-06-08 02:03:14 +00:00
Ilia Alshanetsky 9277da7d9d Fixed test to account for smaller default floating point # precision 2011-06-08 02:03:14 +00:00
Ferenc Kovacs 23cab07e4f adding the serialize_precision=100 for the tests, credits to Mats Lindh for reporting it 2011-05-16 23:31:14 +00:00
Ferenc Kovacs 6b593349cb adding the serialize_precision=100 for the tests, credits to Mats Lindh for reporting it 2011-05-16 23:31:14 +00:00
Ferenc Kovacs a944f7a663 reverting 311103,311105-311109, will commit them to all three branches 2011-05-16 23:22:17 +00:00
Ferenc Kovacs c4e6beebb3 adding the serialize_precision=100 for the tests, credits to Mats Lindh for reporting it 2011-05-16 19:49:59 +00:00
Gustavo André dos Santos Lopes 6dfee4f877 - Changed default serialize_precision from 100 to 17, as discussed in internals. 2011-02-08 21:40:51 +00:00
Gustavo André dos Santos Lopes 257b994fdc - Changed default serialize_precision from 100 to 17, as discussed in internals. 2011-02-08 21:40:51 +00:00
Michael Wallner 89e93723fb Added support for object references in recursive serialize() calls. FR #36424 2010-05-26 07:24:37 +00:00
Felipe Pena a90c801c2f - Fixed tests 2010-04-03 15:42:42 +00:00
Felipe Pena 4d571dee74 - Fixed tests 2010-04-03 15:42:42 +00:00
Arnaud Le Blanc 1bef730840 MFH 2009-04-25 21:13:07 +00:00
Matt Wilmas 927880b5cc MFH: Fixed bug #46882 (Serialize / Unserialize misbehaviour under OS with different bit numbers) 2009-03-17 22:04:10 +00:00
Felipe Pena 358ecee529 - Fixed tests 2008-11-04 17:50:30 +00:00