#47315 [Opn->Bgs]: is_file() MUST NOT be true on remote-files
| From: | scottmac@php.net | Date: | Thu, 05 Feb 2009 15:10:11 +0000 |
| Subject: | #47315 [Opn->Bgs]: is_file() MUST NOT be true on remote-files | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-133536@lists.php.net to get a copy of this message | ||
ID: 47315
Updated by: scottmac@php.net
Reported By: spam2 at rhsoft dot net
-Status: Open
+Status: Bogus
Bug Type: Feature/Change Request
PHP Version: 5.2.8
New Comment:
Wow only 6 years too late for suggested changes. Changes were made to
use streams, the end.
Previous Comments:
------------------------------------------------------------------------
[2009-02-05 14:54:38] spam2 at rhsoft dot net
Description:
------------
> As of PHP 5.0.0, this function can also be used with some URL
> wrappers. Refer to List of Supported Protocols/Wrappers for
> a listing of which wrappers support stat() family of functionality.
Which fool has decided to make such a MAJOR-CHANGE for functions like
"is_file()" as default instead of enable this only with a new optional
parameter?
You will break EVERY check in applications if the given path is a local
file! Revert this completly or add a parameter to enable it
Has anybody ever thougt that this can make SECURITY-PROBLEMS in some
cases?
I hope no one wites a new function like "is_real_file" as seen at
"mysql_escape_string/mysql_real_escape_string", this is crap and
sometimes i wonder why many people are not thinking before doing!
Reproduce code:
---------------
$path = 'ftp://user:pwd@host/file.txt';
if(is_file($path))
{
echo 'yes';
}
else
{
echo 'no';
}
Expected result:
----------------
no
Actual result:
--------------
yes
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47315&edit=1