diff options
| author | Stefan Esser | 2014-02-18 14:52:12 +0100 |
|---|---|---|
| committer | Stefan Esser | 2014-02-18 14:52:12 +0100 |
| commit | 6fef70730793eccc4943bca48c47439cd19b213e (patch) | |
| tree | 832e88b95420d99253cf61480df810c548992215 /tests/cookie/crypt.ua.phpt | |
| parent | 80e2f83cff1750937ba02916d2326ce75e09ef4c (diff) | |
Some tests for the cookie encryption feature from Ben
Diffstat (limited to 'tests/cookie/crypt.ua.phpt')
| -rw-r--r-- | tests/cookie/crypt.ua.phpt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/cookie/crypt.ua.phpt b/tests/cookie/crypt.ua.phpt new file mode 100644 index 0000000..48a98b3 --- /dev/null +++ b/tests/cookie/crypt.ua.phpt | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | --TEST-- | ||
| 2 | cookie with encryption using HTTP_USER_AGENT | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php include "../skipif.inc"; ?> | ||
| 5 | --INI-- | ||
| 6 | suhosin.cookie.encrypt=1 | ||
| 7 | suhosin.cookie.cryptkey= | ||
| 8 | suhosin.cookie.cryptua=On | ||
| 9 | suhosin.cookie.cryptdocroot=0 | ||
| 10 | suhosin.cookie.cryptraddr=0 | ||
| 11 | suhosin.cookie.checkraddr=0 | ||
| 12 | ;suhosin.cookie.cryptlist= | ||
| 13 | ;suhosin.cookie.plainlist= | ||
| 14 | --ENV-- | ||
| 15 | return <<<END | ||
| 16 | HTTP_USER_AGENT=test | ||
| 17 | END; | ||
| 18 | --COOKIE-- | ||
| 19 | a=b | ||
| 20 | --FILE-- | ||
| 21 | <?php | ||
| 22 | setcookie('foo', 'bar'); | ||
| 23 | $ch = preg_grep("/^Set-Cookie:/", headers_list()); | ||
| 24 | echo join("\n", array_values($ch)); | ||
| 25 | ?> | ||
| 26 | --EXPECTF-- | ||
| 27 | Set-Cookie: foo=ZWvJsNdplAsT5Uz57vuUq7-_pbjyXTGeMrUfSrgre5w. \ No newline at end of file | ||
