php-src/tests/basic/bug78929.phpt
Kachalin Alexey 79376ab209 Fix #78929: plus signs in cookie values are converted to spaces
We switch the cookie value parsing function from `php_url_decode()` to
`php_raw_url_decode()`, so that cookie values are now parsed according
to RFC 6265, section 4.1.1.  We also refactor to remove duplicate code
without changing the execution flow.
2019-12-12 14:21:46 +01:00

17 lines
420 B
PHP

--TEST--
Bug #78929 (plus signs in cookie values are converted to spaces)
--INI--
max_input_vars=1000
filter.default=unsafe_raw
--COOKIE--
RFC6265=#$%&'()*+-./0123456789<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~!
--FILE--
<?php
var_dump($_COOKIE);
?>
--EXPECT--
array(1) {
["RFC6265"]=>
string(89) "#$%&'()*+-./0123456789<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~!"
}