On a server I use webspace on, there are several accounts all seperated by usernames and passwords and have seperate ftp access etc. However, they are all in the same domain i.e they appear to be, from the url, all part of the same directory.
BUT... someone today notified me they had been able to get php source code from my account, by catching the code before the server parses it. Apprently this is possible because it's all in the same domain.
The person who notified me told me the start of the php file he used (sadly would not give me the whole thing).
This is:
<?php
// downloading a file
$filename = $_GET['filename'];
$filename = "../0201376/server/incs/phplogin7inc.php";
// fix for IE catching or PHP bug issue
header("Pragma: public");
header("Expires: 0"); // set expiration time
header("Cache-Control: must-revalidate, post-check=0,
pre-check=0");
// browser must download file from server instead of cache
I dont know if that is any help to anyone, or anyone recognises it, but can anyone recognise a way to protect files, or get around this security flaw?
Thank you