diff options
| author | Kachalin Alexey <kachalin.alexey@gmail.com> | 2019-12-12 11:49:06 +0100 |
|---|---|---|
| committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-12-12 14:21:46 +0100 |
| commit | 79376ab209f61be03bbf8c1b6177c18261767da8 (patch) | |
| tree | 7e888c61aa5a8a90ac06359522f2fd44c00ebe74 /tests/basic | |
| parent | be89a5c7f191b319c11b3b487a1366e20a1fdc17 (diff) | |
| download | php-git-79376ab209f61be03bbf8c1b6177c18261767da8.tar.gz | |
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.
Diffstat (limited to 'tests/basic')
| -rw-r--r-- | tests/basic/bug78929.phpt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/basic/bug78929.phpt b/tests/basic/bug78929.phpt new file mode 100644 index 0000000000..60b71d1f8f --- /dev/null +++ b/tests/basic/bug78929.phpt @@ -0,0 +1,16 @@ +--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{|}~!" +} |
