summaryrefslogtreecommitdiff
path: root/tests/cookie/crypt.cryptlist.phpt
diff options
context:
space:
mode:
authorStefan Esser2014-02-18 14:52:12 +0100
committerStefan Esser2014-02-18 14:52:12 +0100
commit6fef70730793eccc4943bca48c47439cd19b213e (patch)
tree832e88b95420d99253cf61480df810c548992215 /tests/cookie/crypt.cryptlist.phpt
parent80e2f83cff1750937ba02916d2326ce75e09ef4c (diff)
Some tests for the cookie encryption feature from Ben
Diffstat (limited to 'tests/cookie/crypt.cryptlist.phpt')
-rw-r--r--tests/cookie/crypt.cryptlist.phpt29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/cookie/crypt.cryptlist.phpt b/tests/cookie/crypt.cryptlist.phpt
new file mode 100644
index 0000000..e56ac24
--- /dev/null
+++ b/tests/cookie/crypt.cryptlist.phpt
@@ -0,0 +1,29 @@
1--TEST--
2cookie encryption with cryptlist set
3--SKIPIF--
4<?php include "../skipif.inc"; ?>
5--INI--
6suhosin.cookie.encrypt=1
7suhosin.cookie.cryptkey=
8suhosin.cookie.cryptua=0
9suhosin.cookie.cryptdocroot=0
10suhosin.cookie.cryptraddr=0
11suhosin.cookie.checkraddr=0
12suhosin.cookie.cryptlist=a,b,foo,c
13;suhosin.cookie.plainlist=
14--ENV--
15return <<<END
16REMOTE_ADDR=127.0.0.1
17END;
18--COOKIE--
19a=b
20--FILE--
21<?php
22setcookie('foo', 'bar');
23setcookie('foo2', 'bar2');
24$ch = preg_grep("/^Set-Cookie:/", headers_list());
25echo join("\n", array_values($ch));
26?>
27--EXPECTF--
28Set-Cookie: foo=EgJxlQxzPwoAcVFj395vssv3hy1rAem1lH9qZYUvRi8.
29Set-Cookie: foo2=bar2 \ No newline at end of file