Jump to content

Suggestion. Need some help


Mod-Jay

Recommended Posts

No purpose to having md5 as I can see, assuming you mean include a php file based on $_get["page"]....

 

$page = $_GET["page"];

// Includes whatever page they want, totally insecure!
// Could send a GET request with page = http://mysite.com/totalhackz0rscript.php
include($page);

// So we'll use whitelisting

$acceptablePages = array(
"page1.php",
"page2.php",
"page3.php");

if (in_array($_GET["page"], $acceptablePages))
{
include($_GET["page"]);
} else {
exit("The page you requested is not allowed."):
}


Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.