note 52505 added to function.fread

From: Date: Tue, 03 May 2005 22:24:20 +0000
Subject: note 52505 added to function.fread
Groups: php.notes 
Request: Send a blank email to php-notes+get-88914@lists.php.net to get a copy of this message
Be very careful if fread() accepts user input. Even if you're just using it for URLs, a user could view the contents of any file on your site or even server, depending on how it's set up. All they have to do is put in a valid filename (ie - "./index.php"). If you're allowing user input, you should AT LEAST verify that is_file() returns false before you display the contents to the user. ---- Manual Page -- http://www.php.net/manual/en/function.fread.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+52505 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52505&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52505&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52505&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52505&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52505&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+52505&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#88914) next »