summaryrefslogtreecommitdiff
path: root/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_short_cookie.phpt
blob: 53f4f3f2b28469d91dfc5cbf06b15f74c3b2f669 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--TEST--
Cookie encryption - invalid decryption in simulation mode with a short cookie
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/config_encrypted_cookies_simulation.ini
display_errors=1
display_startup_errors=1
error_reporting=E_ALL
--COOKIE--
super_cookie=AAA;awful_cookie=awful_cookie_value;
--ENV--
return <<<EOF
REMOTE_ADDR=127.0.0.1
EOF;
--FILE--
<?php var_dump($_COOKIE); ?>
--EXPECT--
Warning: [snuffleupagus][127.0.0.1][cookie_encryption][simulation] Buffer underflow tentative detected in cookie encryption handling for super_cookie. Using the cookie 'as is' instead of decrypting it in Unknown on line 0
array(2) {
  ["super_cookie"]=>
  string(3) "AAA"
  ["awful_cookie"]=>
  string(18) "awful_cookie_value"
}