summaryrefslogtreecommitdiff
path: root/ext/wddx/tests/bug70741.phpt
blob: 061fa65ef812eadf01cb7d745f301d870370a333 (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
26
--TEST--
Bug #70741 (Session WDDX Packet Deserialization Type Confusion Vulnerability)
--SKIPIF--
<?php
if (!extension_loaded("wddx")) print "skip";
if (!extension_loaded("session")) print "skip session extension not available";
?>
--FILE--
<?php
ini_set('session.serialize_handler', 'wddx');
session_start();

$hashtable = str_repeat('A', 66);
$wddx = "<?xml version='1.0'?>
<wddxPacket version='1.0'>
<header/>
	<data>
		<string>$hashtable</string>
	</data>
</wddxPacket>";
session_decode($wddx);
?>
DONE
--EXPECTF--
Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s on line %d
DONE