From d8c818cf54799c4a89b0a8e0ee3fda7dc306d838 Mon Sep 17 00:00:00 2001 From: rMalie Date: Mon, 13 Feb 2012 16:56:28 +0000 Subject: [PATCH] // Fix redirection to index when friendly url are activated #PSFV-488 --- classes/Dispatcher.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/Dispatcher.php b/classes/Dispatcher.php index 85bb8d3b5..4c31d1e11 100644 --- a/classes/Dispatcher.php +++ b/classes/Dispatcher.php @@ -545,8 +545,10 @@ class DispatcherCore else if (isset($_POST['controller'])) $_POST[$m[2]] = $m[3]; } + if (!Validate::isControllerName($controller)) $controller = false; + // Use routes ? (for url rewriting) if ($this->use_routes && !$controller) { @@ -576,7 +578,7 @@ class DispatcherCore break; } - if ($controller == 'index') + if ($controller == 'index' || $this->request_uri == '/index.php') $controller = $this->default_controller; $this->controller = $controller; }