fopen wrapper doesn't fail on invalid hostname with curlwrappers enabled
| Bug #38269 | fopen wrapper doesn't fail on invalid hostname with curlwrappers enabled | ||||
|---|---|---|---|---|---|
| Submitted: | 2006-07-31 14:46 UTC | Modified: | 2006-08-01 13:28 UTC | ||
| From: | blueshade at wave460 dot net | Assigned: | |||
| Status: | Closed | Package: | Streams related | ||
| PHP Version: | 5.1.4 | OS: | debian sarge on linux 2.4.27 | ||
| Private report: | No | CVE-ID: | None | ||
[2006-07-31 14:46 UTC] blueshade at wave460 dot net
Description:
------------
when compiled with "--with-curlwrappers", php 5.1.4 fails to fail an fopen request when you provide it with a uri containing an invalid host name, when recompiled without "--with-curlwrappers", it fails as expected...
this results in php invalidly returing a valid fopen resource even if the remote host is unreachable (e.g. because of a network problem)
Reproduce code:
---------------
<?
$file = fopen('http://non.existent.host', 'rb');
print_r($file);
echo "\n";
?>
Expected result:
----------------
it should display a warning (if enabled) and return "false" in $file
Actual result:
--------------
with "--with-curlwrappers", it returns "Resource id #5" in $file and doesn't warn of an error whatsoever
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2006-08-01 13:28 UTC] tony2001@php.net