mirror of
https://github.com/php/php-src.git
synced 2026-04-24 00:18:23 +02:00
21 lines
365 B
PHP
21 lines
365 B
PHP
--TEST--
|
|
Bug #68089 (NULL byte injection - cURL lib)
|
|
--EXTENSIONS--
|
|
curl
|
|
--FILE--
|
|
<?php
|
|
$url = "file:///etc/passwd\0http://google.com";
|
|
$ch = curl_init();
|
|
|
|
try {
|
|
curl_setopt($ch, CURLOPT_URL, $url);
|
|
} catch (ValueError $exception) {
|
|
echo $exception->getMessage() . "\n";
|
|
}
|
|
|
|
?>
|
|
Done
|
|
--EXPECT--
|
|
curl_setopt(): cURL option must not contain any null bytes
|
|
Done
|