1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 00:48:25 +02:00
Files
archived-php-src/ext/curl/tests/bug68089.phpt
T
Stanislav Malyshev 71b63fc701 Fix bug #68089 - do not accept options with embedded \0
Conflicts:
	ext/curl/interface.c
2014-10-14 10:45:35 -07:00

19 lines
361 B
PHP

--TEST--
Bug #68089 (NULL byte injection - cURL lib)
--SKIPIF--
<?php
include 'skipif.inc';
?>
--FILE--
<?php
$url = "file:///etc/passwd\0http://google.com";
$ch = curl_init();
var_dump(curl_setopt($ch, CURLOPT_URL, $url));
?>
Done
--EXPECTF--
Warning: curl_setopt(): Curl option contains invalid characters (\0) in %s/bug68089.php on line 4
bool(false)
Done