summaryrefslogtreecommitdiff
path: root/src/tests/encrypt_regexp_cookies3.phpt
diff options
context:
space:
mode:
authorThibault "bui" Koechlin2017-12-28 13:37:10 +0100
committerjvoisin2017-12-28 13:37:10 +0100
commitbc4d0e014e9fb1edd05e6f9c91cbf97b6c5546b4 (patch)
treecad37642d9c1e5ef786f29c18a030c4a8a288af2 /src/tests/encrypt_regexp_cookies3.phpt
parentfe057bba5baaef8fe428b971604194ef9c9119c0 (diff)
Implement regexp support for cookies encryption
It's now possible to encrypt cookies matching a specific regexp. This should close #106
Diffstat (limited to 'src/tests/encrypt_regexp_cookies3.phpt')
-rw-r--r--src/tests/encrypt_regexp_cookies3.phpt23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tests/encrypt_regexp_cookies3.phpt b/src/tests/encrypt_regexp_cookies3.phpt
new file mode 100644
index 0000000..ceb364c
--- /dev/null
+++ b/src/tests/encrypt_regexp_cookies3.phpt
@@ -0,0 +1,23 @@
1--TEST--
2Cookie decryption with ipv6
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini
7--COOKIE--
8super_cookie=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABM84SCotZTpP6b27Lr5lavORPMvqaKpcUahvxw=;awful_cookie=awful_cookie_value;
9--ENV--
10return <<<EOF
11REMOTE_ADDR=2001:0db8:0000:0000:0000:fe00:0042:8329
12HTTP_USER_AGENT=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/59.0.3071.109 Chrome/59.0.3071.109 Safari/537.36
13HTTPS=1
14EOF;
15--FILE--
16<?php var_dump($_COOKIE); ?>
17--EXPECT--
18array(2) {
19 ["super_cookie"]=>
20 string(11) "super_value"
21 ["awful_cookie"]=>
22 string(18) "awful_cookie_value"
23}