summaryrefslogtreecommitdiff
path: root/ext/curl/tests/bug68089.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/curl/tests/bug68089.phpt')
-rw-r--r--ext/curl/tests/bug68089.phpt18
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/curl/tests/bug68089.phpt b/ext/curl/tests/bug68089.phpt
new file mode 100644
index 0000000000..3bd5889709
--- /dev/null
+++ b/ext/curl/tests/bug68089.phpt
@@ -0,0 +1,18 @@
+--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