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
26
27
28
29
|
--TEST--
Cookie encryption in ipv6
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip Not implemented for PHP 8+"; ?>
--INI--
sp.configuration_file={PWD}/config/config_encrypted_cookies.ini
--COOKIE--
--ENV--
return <<<EOF
REMOTE_ADDR=2001:0db8:0000:0000:0000:fe00:0042:8329
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
HTTPS=1
EOF;
--FILE--
<?php
setcookie("super_cookie", "super_value");
setcookie("awful_cookie", "awful_value");
setcookie("nice_cookie", "nice_value", 1, "1", "1", true, true);
$ret = setcookie("", "Cookie with no name", 1, "1", "1", true, true);
if ($ret == TRUE) {
echo "fail :/";
}
var_dump($_COOKIE);
?>
--EXPECTF--
Warning: Cookie names must not be empty in %a/encrypt_cookies4.php on line %d
array(0) {
}
|