bug68089.phpt 365 B

1234567891011121314151617181920
  1. --TEST--
  2. Bug #68089 (NULL byte injection - cURL lib)
  3. --EXTENSIONS--
  4. curl
  5. --FILE--
  6. <?php
  7. $url = "file:///etc/passwd\0http://google.com";
  8. $ch = curl_init();
  9. try {
  10. curl_setopt($ch, CURLOPT_URL, $url);
  11. } catch (ValueError $exception) {
  12. echo $exception->getMessage() . "\n";
  13. }
  14. ?>
  15. Done
  16. --EXPECT--
  17. curl_setopt(): cURL option must not contain any null bytes
  18. Done