|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-01-29 23:59 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 08:00:01 2025 UTC |
Description: ------------ Isn't this a bug? php > print serialize("hi\rho"); ho";"hi php > print unserialize(serialize("hi\rho")); ho I stumbled on this while working on a Drupal system. Can this possibly have security consequences as well? if a \r on a web form breaks the internal data structures of a system? Am I missing anything? PS: I am actually using PHP 5.2.6 on Ubuntu Intrepid. Cheers, Nir Reproduce code: --------------- print serialize("hi\rho"); Expected result: ---------------- s:5:"hi ho"; Actual result: -------------- ho";"hi