From:             bugs dot php dot net at honeypot-1 dot dnsalias dot net
Operating system: Linux 2.4
PHP version:      4.4.1
PHP Bug Type:     HTTP related
Bug description:  '+' in Cookies converted to ' ' (space)

Description:
------------
As far as I know (Netscape specification) cookies are allowed to contain
the '+'-character. Up to and including PHP 4.4.0 this is the way they were
handled. But with PHP 4.4.1 pluses in the cookie value are replaced by a
single space, like in values of GET-parameters.

Reproduce code:
---------------
// run twice

header('Set-Cookie: my_cookie=ABC+DEF');
phpinfo();

Expected result:
----------------
// as up to 4.4.0

_REQUEST['my_cookie']  ==           'ABC+DEF';
_COOKIE['my_cookie']   ==           'ABC+DEF';
_SERVER["HTTP_COOKIE"] == 'my_cookie=ABC+DEF';

Actual result:
--------------
_REQUEST['my_cookie']  ==           'ABC DEF';
_COOKIE['my_cookie']   ==           'ABC DEF';
_SERVER["HTTP_COOKIE"] == 'my_cookie=ABC+DEF';

-- 
Edit bug report at http://bugs.php.net/?id=35523&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=35523&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=35523&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=35523&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=35523&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=35523&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=35523&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=35523&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=35523&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=35523&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=35523&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=35523&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=35523&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=35523&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=35523&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=35523&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=35523&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=35523&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=35523&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=35523&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=35523&r=mysqlcfg

Reply via email to