diff options
| author | Thibault "bui" Koechlin | 2017-12-28 13:37:10 +0100 |
|---|---|---|
| committer | jvoisin | 2017-12-28 13:37:10 +0100 |
| commit | bc4d0e014e9fb1edd05e6f9c91cbf97b6c5546b4 (patch) | |
| tree | cad37642d9c1e5ef786f29c18a030c4a8a288af2 /src/tests/encrypt_regexp_cookies3.phpt | |
| parent | fe057bba5baaef8fe428b971604194ef9c9119c0 (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.phpt | 23 |
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-- | ||
| 2 | Cookie decryption with ipv6 | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini | ||
| 7 | --COOKIE-- | ||
| 8 | super_cookie=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABM84SCotZTpP6b27Lr5lavORPMvqaKpcUahvxw=;awful_cookie=awful_cookie_value; | ||
| 9 | --ENV-- | ||
| 10 | return <<<EOF | ||
| 11 | REMOTE_ADDR=2001:0db8:0000:0000:0000:fe00:0042:8329 | ||
| 12 | HTTP_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 | ||
| 13 | HTTPS=1 | ||
| 14 | EOF; | ||
| 15 | --FILE-- | ||
| 16 | <?php var_dump($_COOKIE); ?> | ||
| 17 | --EXPECT-- | ||
| 18 | array(2) { | ||
| 19 | ["super_cookie"]=> | ||
| 20 | string(11) "super_value" | ||
| 21 | ["awful_cookie"]=> | ||
| 22 | string(18) "awful_cookie_value" | ||
| 23 | } | ||
