1--TEST--
2Bug #71323: Output of stream_get_meta_data can be falsified by its input
3--INI--
4allow_url_fopen=1
5--FILE--
6<?php
7$file = 'data:text/plain;z=y;uri=eviluri;mediatype=wut?;mediatype2=hello,somedata';
8$meta = stream_get_meta_data(fopen($file, "r"));
9var_dump($meta);
10?>
11--EXPECTF--
12array(10) {
13  ["mediatype"]=>
14  string(10) "text/plain"
15  ["z"]=>
16  string(1) "y"
17  ["uri"]=>
18  string(72) "data:text/plain;z=y;uri=eviluri;mediatype=wut?;mediatype2=hello,somedata"
19  ["mediatype2"]=>
20  string(5) "hello"
21  ["base64"]=>
22  bool(false)
23  ["wrapper_type"]=>
24  string(7) "RFC2397"
25  ["stream_type"]=>
26  string(7) "RFC2397"
27  ["mode"]=>
28  string(1) "r"
29  ["unread_bytes"]=>
30  int(0)
31  ["seekable"]=>
32  bool(true)
33}
34