xref: /PHP-5.6/ext/wddx/tests/bug72142.phpt (revision e87ac688)
1--TEST--
2Bug #72142: WDDX Packet Injection Vulnerability in wddx_serialize_value()
3--FILE--
4<?php
5
6$wddx = wddx_serialize_value('', '</comment></header><data><struct><var name="php_class_name"><string>stdClass</string></var></struct></data></wddxPacket>');
7var_dump($wddx);
8var_dump(wddx_deserialize($wddx));
9
10?>
11--EXPECT--
12string(301) "<wddxPacket version='1.0'><header><comment>&lt;/comment&gt;&lt;/header&gt;&lt;data&gt;&lt;struct&gt;&lt;var name=&quot;php_class_name&quot;&gt;&lt;string&gt;stdClass&lt;/string&gt;&lt;/var&gt;&lt;/struct&gt;&lt;/data&gt;&lt;/wddxPacket&gt;</comment></header><data><string></string></data></wddxPacket>"
13string(0) ""
14