summaryrefslogtreecommitdiff
path: root/tests/cookie/crypt.raddr_1.phpt
diff options
context:
space:
mode:
authorBen Fuhrmannek2016-02-24 00:36:35 +0100
committerBen Fuhrmannek2016-02-24 00:36:35 +0100
commit346455c6b5716c8ce095235428614e15c0adf13e (patch)
treeaaa648869e88287ed34c6d36cc06474d062b4b32 /tests/cookie/crypt.raddr_1.phpt
parent35b7c9a0e3f8a0daf1718a8ba9889a2aec24dc84 (diff)
cookie encryption
Diffstat (limited to 'tests/cookie/crypt.raddr_1.phpt')
-rw-r--r--tests/cookie/crypt.raddr_1.phpt27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/cookie/crypt.raddr_1.phpt b/tests/cookie/crypt.raddr_1.phpt
new file mode 100644
index 0000000..54400b5
--- /dev/null
+++ b/tests/cookie/crypt.raddr_1.phpt
@@ -0,0 +1,27 @@
1--TEST--
2cookie encryption using REMOTE_ADDR (cryptraddr=1)
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=1
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=lwB1g2gEIQbzRLsbKEyLcKlmu6kpBNRd6sft46-la-4. \ No newline at end of file