xref: /PHP-7.2/ext/curl/tests/bug68089.phpt (revision 17ccbeec)
1--TEST--
2Bug #68089 (NULL byte injection - cURL lib)
3--SKIPIF--
4<?php
5include 'skipif.inc';
6
7?>
8--FILE--
9<?php
10$url = "file:///etc/passwd\0http://google.com";
11$ch = curl_init();
12var_dump(curl_setopt($ch, CURLOPT_URL, $url));
13?>
14Done
15--EXPECTF--
16Warning: curl_setopt(): Curl option contains invalid characters (\0) in %s%ebug68089.php on line 4
17bool(false)
18Done
19