summaryrefslogtreecommitdiff
path: root/src/tests/session_encryption/crypt_session_invalid_simul.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/session_encryption/crypt_session_invalid_simul.phpt')
-rw-r--r--src/tests/session_encryption/crypt_session_invalid_simul.phpt15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/tests/session_encryption/crypt_session_invalid_simul.phpt b/src/tests/session_encryption/crypt_session_invalid_simul.phpt
index cbb80dc..3eb619c 100644
--- a/src/tests/session_encryption/crypt_session_invalid_simul.phpt
+++ b/src/tests/session_encryption/crypt_session_invalid_simul.phpt
@@ -2,8 +2,14 @@
2SESSION crypt and bad decrypt 2SESSION crypt and bad decrypt
3--SKIPIF-- 3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> 4<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
5<?php if (!extension_loaded("session")) print "skip"; ?>
6--EXTENSIONS--
7session
5--INI-- 8--INI--
6sp.configuration_file={PWD}/config/config_crypt_session_simul.ini 9sp.configuration_file={PWD}/config/config_crypt_session_simul.ini
10display_errors=0
11log_errors=1
12error_log="{PWD}"/crypt_session_invalid_simul.tmp
7--ENV-- 13--ENV--
8return <<<EOF 14return <<<EOF
9REMOTE_ADDR=127.0.0.1 15REMOTE_ADDR=127.0.0.1
@@ -19,9 +25,12 @@ putenv("REMOTE_ADDR=127.0.0.2");
19session_id($id); // Recover the session with the previous session_id 25session_id($id); // Recover the session with the previous session_id
20session_start(); // Re start the session, It will read and decrypt the non empty session 26session_start(); // Re start the session, It will read and decrypt the non empty session
21var_dump($_SESSION); // Dump the session 27var_dump($_SESSION); // Dump the session
28
29echo file_get_contents(dirname(__FILE__) . "/crypt_session_invalid_simul.tmp");
30unlink(dirname(__FILE__) . "/crypt_session_invalid_simul.tmp");
31
22?> 32?>
23--EXPECTF-- 33--EXPECTF--
24array(1) { 34array(0) {
25 ["toto"]=>
26 string(4) "tata"
27} 35}
36%sPHP Warning: [snuffleupagus][127.0.0.2][cookie_encryption][simulation] Something went wrong with the decryption of the session. Using the cookie 'as is' instead of decrypting it in %a/crypt_session_invalid_simul.php on line 9%A \ No newline at end of file