From:             spam2 at rhsoft dot net
Operating system: 
PHP version:      5.2.8
PHP Bug Type:     Feature/Change Request
Bug description:  is_file() MUST NOT be true on remote-files

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:p...@host/file.txt';
if(is_file($path))                                   
{                                                    
 echo 'yes';              
}                                                    
else
{
 echo 'no';
}


Expected result:
----------------
no

Actual result:
--------------
yes 

-- 
Edit bug report at http://bugs.php.net/?id=47315&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=47315&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=47315&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=47315&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=47315&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=47315&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=47315&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=47315&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=47315&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=47315&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=47315&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=47315&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=47315&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=47315&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=47315&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=47315&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=47315&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=47315&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=47315&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=47315&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=47315&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=47315&r=mysqlcfg

Reply via email to