A little question about readdir problem

Problems with the Windows version of XAMPP, questions, comments, and anything related.

A little question about readdir problem

Postby alierainy1230 » 02. April 2018 04:48

Well, Everything is working fine.. but when I allow someone to upload files in any map in htdocs and they should use a $readdir script they can list all my pc files.. How can I prevent them from reading outside my htdocs dir??
alierainy1230
 
Posts: 2
Joined: 31. March 2018 12:53
XAMPP version: 1.8.2-1
Operating System: Windows

Re: A little question about readdir problem

Postby Nobbie » 02. April 2018 16:15

The by far best protection: dont allow others to upload PHP files to your htdocs folder. Would you allow others to install any Executable into your Windows drive? Thats basically the same.

Anyway, there is an open_basedir option in php.ini, which restricts PHP to a certain directory tree (you should read the documentation). But this of course affects your own PHP scripts as well.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: A little question about readdir problem

Postby alierainy1230 » 09. April 2018 09:30

http://google.com
alierainy1230
 
Posts: 2
Joined: 31. March 2018 12:53
XAMPP version: 1.8.2-1
Operating System: Windows


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 118 guests