summaryrefslogtreecommitdiff
path: root/tests/cookie/crypt.raddr_4.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.raddr_4.phpt
parent80e2f83cff1750937ba02916d2326ce75e09ef4c (diff)
Some tests for the cookie encryption feature from Ben
Diffstat (limited to 'tests/cookie/crypt.raddr_4.phpt')
-rw-r--r--tests/cookie/crypt.raddr_4.phpt27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/cookie/crypt.raddr_4.phpt b/tests/cookie/crypt.raddr_4.phpt
new file mode 100644
index 0000000..2862f9f
--- /dev/null
+++ b/tests/cookie/crypt.raddr_4.phpt
@@ -0,0 +1,27 @@
1--TEST--
2cookie encryption using REMOTE_ADDR (cryptraddr=4)
3--SKIPIF--
4<?php include "../skipif.inc"; ?>
5--INI--
6suhosin.cookie.encrypt=1
7suhosin.cookie.cryptkey=
8suhosin.cookie.cryptua=Off
9suhosin.cookie.cryptdocroot=Off
10suhosin.cookie.cryptraddr=4
11suhosin.cookie.checkraddr=0
12;suhosin.cookie.cryptlist=
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');
23$ch = preg_grep("/^Set-Cookie:/", headers_list());
24echo join("\n", array_values($ch));
25?>
26--EXPECTF--
27Set-Cookie: foo=KYNdxYn5b1vujSEplr6YyON2A04YRH0YY4pCZWQDxG8. \ No newline at end of file