note 112244 added to function.scandir
| From: | mirthenemrys at gmail dot com | Date: | Tue, 21 May 2013 19:25:36 +0000 |
| Subject: | note 112244 added to function.scandir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-194876@lists.php.net to get a copy of this message | ||
This method would leave the file system vulnerable using ../ for the ?dir= A person could navigate
any readable file system simply by adding ../ enough times to get back to the root of the drive.
On a proper secure system this might not matter, however for less secure file systems where the web
user(apache user) can at least read most files, or on multi-user web servers this could lead to
potential security risks.
Adding a check to see if ../ is in the $_GET["dir"] is one way to prevent this.
----
Server IP: 69.147.83.199
Probable Submitter: 108.17.120.33
----
Manual Page -- http://php.net/manual/en/function.scandir.php
Edit -- https://master.php.net/note/edit/112244
Del: integrated -- https://master.php.net/note/delete/112244/integrated
Del: useless -- https://master.php.net/note/delete/112244/useless
Del: bad code -- https://master.php.net/note/delete/112244/bad+code
Del: spam -- https://master.php.net/note/delete/112244/spam
Del: non-english -- https://master.php.net/note/delete/112244/non-english
Del: in docs -- https://master.php.net/note/delete/112244/in+docs
Del: other reasons-- https://master.php.net/note/delete/112244
Reject -- https://master.php.net/note/reject/112244
Search -- https://master.php.net/manage/user-notes.php