From 237e7f11c9dff7adeb62572922976aae72b3badb Mon Sep 17 00:00:00 2001 From: Rouslan Placella Date: Wed, 27 Jun 2012 13:47:05 +0100 Subject: [PATCH] Avoid redirecting to self --- index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/index.php b/index.php index 1c45e3ed62..4bbd103175 100644 --- a/index.php +++ b/index.php @@ -35,6 +35,7 @@ unset($drops, $each_drop); // If we have a valid a valid target, lets load that script instead if (! empty($_REQUEST['target']) && is_string($_REQUEST['target']) + && ! preg_match('/^index/', $_REQUEST['target']) && in_array($_REQUEST['target'], $goto_whitelist) ) { include $_REQUEST['target'];