Customer's site got hacked and the only code in his web page is as follows...
Doesnt appear to be anything there that could be exploited, but I'm no PHP expert. Could someone possibly confirm please ?
Code:
<?php $page = $_REQUEST['page'];
if ($page == '') $page = "home.htm"; // One-liner if statement needs no brackets!
if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/' . $page)) {
include($_SERVER['DOCUMENT_ROOT'] . '/' . $page);
} else if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/domain.org/' . $page)) {
include($_SERVER['DOCUMENT_ROOT'] . '/domain.org/' . $page);
} else {
echo "<br /><br />Page Not Found!";
}
?>