prepare v4.2.5
[m6w6/ext-http] / tests / bug73055.phpt
1 --TEST--
2 Bug #73055 (Type confusion vulnerability in merge_param())
3 --SKIPIF--
4 <?php
5 include "skipif.inc";
6 ?>
7 --INI--
8 zend.exception_ignore_args=off
9 --FILE--
10 <?php
11
12 echo "Test\n";
13
14 try {
15 echo new http\QueryString("[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]][[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[&%C0[]E[=&2[&%C0[]E[16706[*[");
16 } catch (Exception $e) {
17 echo $e;
18 }
19 ?>
20
21 ===DONE===
22 --EXPECTF--
23 Test
24 %r(exception ')?%rhttp\Exception\BadQueryStringException%r(' with message '|: )%rhttp\QueryString::__construct(): Max input nesting level of %d exceeded%r'?%r in %sbug73055.php:%d
25 Stack trace:
26 #0 %sbug73055.php(%d): http\QueryString->__construct('[[[[[[[[[[[[[[[...')
27 #1 {main}
28 ===DONE===