[freenet-cvs] r11458 - trunk/website

nextgens at freenetproject.org nextgens at freenetproject.org
Sun Dec 17 08:26:26 UTC 2006


Author: nextgens
Date: 2006-12-17 08:26:25 +0000 (Sun, 17 Dec 2006)
New Revision: 11458

Modified:
   trunk/website/index.php
Log:
website: we ought to send a 404 when needed

Modified: trunk/website/index.php
===================================================================
--- trunk/website/index.php	2006-12-17 02:20:15 UTC (rev 11457)
+++ trunk/website/index.php	2006-12-17 08:26:25 UTC (rev 11458)
@@ -1,6 +1,11 @@
 <?
 if (isset($_REQUEST["page"])) {
 	$page = htmlentities($_REQUEST["page"]);
+	if(!file_exists("pages/".escapeshellcmd($page).".php") )
+	{
+		header('HTTP/1.0 404 Not Found');
+		exit();
+	}
 } else {
 	$page = "index";
 }




More information about the cvs mailing list