summaryrefslogtreecommitdiff
path: root/tests/cookie/crypt.key_empty_remote_addr.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cookie/crypt.key_empty_remote_addr.phpt')
-rw-r--r--tests/cookie/crypt.key_empty_remote_addr.phpt27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/cookie/crypt.key_empty_remote_addr.phpt b/tests/cookie/crypt.key_empty_remote_addr.phpt
new file mode 100644
index 0000000..fb00766
--- /dev/null
+++ b/tests/cookie/crypt.key_empty_remote_addr.phpt
@@ -0,0 +1,27 @@
1--TEST--
2cookie encryption with empty key and REMOTE_ADDR 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
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=EgJxlQxzPwoAcVFj395vssv3hy1rAem1lH9qZYUvRi8. \ No newline at end of file