Bug #62039 [NEW]: When multiple cookies are received, $Version=0 is badly concatened
| From: | laurent dot perez at backelite dot com | Date: | Tue, 15 May 2012 16:11:11 +0000 |
| Subject: | Bug #62039 [NEW]: When multiple cookies are received, $Version=0 is badly concatened | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-170475@lists.php.net to get a copy of this message | ||
From:
Operating system: PHP 5.3.6-13ubuntu3.7
PHP version: master-Git-2012-05-15 (Git)
Package: HTTP related
Bug Type: Bug
Bug description:When multiple cookies are received, $Version=0 is badly concatened
Description:
------------
Hi
I'm sending the following cookies to a PHP 5.3.6-13ubuntu3.7 page :
>> "Cookie: $Version=0; applicookie=monappli[\r][\n]"
>> "Cookie: $Version=0; monautrecookie=autrevaleur[\r][\n]"
When I dump them using print_r($_COOKIE);, the value of the first one
(applicookie) gets concatenated with a comma plus $Version=0 string :
<< " [applicookie] => monappli, $Version=0[\n]"
<< " [monautrecookie] => autrevaleur[\n]"
It looks like a concatenation bug. The value of applicookie should not be
modified.
Test script:
---------------
Get Firebug, install Firecookie, forge two cookies as HttpOnly, send them,
<?php
print_r($_COOKIE);
?> will display a wrong value for the first one received.
Expected result:
----------------
Unmodified cookie values
Actual result:
--------------
The first cookie value gets concatenated with comma + $Version=0 string
--
Edit bug report at https://bugs.php.net/bug.php?id=62039&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62039&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62039&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62039&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=62039&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62039&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=62039&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=62039&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=62039&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=62039&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=62039&r=support
Expected behavior: https://bugs.php.net/fix.php?id=62039&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=62039&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=62039&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=62039&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62039&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=62039&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=62039&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=62039&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=62039&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=62039&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=62039&r=mysqlcfg