diff options
Diffstat (limited to 'src/tests/encrypt_cookies_invalid_decryption_simulation.phpt')
| -rw-r--r-- | src/tests/encrypt_cookies_invalid_decryption_simulation.phpt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/tests/encrypt_cookies_invalid_decryption_simulation.phpt b/src/tests/encrypt_cookies_invalid_decryption_simulation.phpt new file mode 100644 index 0000000..0bd1dc8 --- /dev/null +++ b/src/tests/encrypt_cookies_invalid_decryption_simulation.phpt | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | --TEST-- | ||
| 2 | Cookie encryption - invalid decryption in simulation mode | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies_simulation.ini | ||
| 7 | display_errors=1 | ||
| 8 | display_startup_errors=1 | ||
| 9 | error_reporting=E_ALL | ||
| 10 | --COOKIE-- | ||
| 11 | super_cookie=Wk9NR1RISVNJU05PVEVOQ1JZUFRFREFUQUxMV0hBVFRIRUhFTExJU0hIRUxMQVJFWU9VRE9JTkdaT01Hb2htYXliZXRoaXNpc2Fub2xkc2Vzc2lvbmNvb2tpZQo=;awfulcookie=awfulcookievalue; | ||
| 12 | --ENV-- | ||
| 13 | return <<<EOF | ||
| 14 | REMOTE_ADDR=127.0.0.1 | ||
| 15 | EOF; | ||
| 16 | --FILE-- | ||
| 17 | <?php | ||
| 18 | echo "1337\n"; | ||
| 19 | var_dump($_COOKIE); ?> | ||
| 20 | --EXPECT-- | ||
| 21 | 1337 | ||
| 22 | array(2) { | ||
| 23 | ["super_cookie"]=> | ||
| 24 | string(124) "Wk9NR1RISVNJU05PVEVOQ1JZUFRFREFUQUxMV0hBVFRIRUhFTExJU0hIRUxMQVJFWU9VRE9JTkdaT01Hb2htYXliZXRoaXNpc2Fub2xkc2Vzc2lvbmNvb2tpZQo=" | ||
| 25 | ["awfulcookie"]=> | ||
| 26 | string(16) "awfulcookievalue" | ||
| 27 | } | ||
