From ab28c127d0294c72bc1510c7c635036d24d3a733 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Fri, 18 Jul 2008 03:54:22 +0000 Subject: [PATCH] BUGFIX: Prevent infinite loop by visiting page/run git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@58354 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/control/Controller.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/control/Controller.php b/core/control/Controller.php index 0639fa8a1..830c8bce6 100644 --- a/core/control/Controller.php +++ b/core/control/Controller.php @@ -110,7 +110,8 @@ class Controller extends ViewableData { if(!$this->action) $this->action = 'index'; // Check security on the controller - if(!$this->checkAccessAction($this->action)) { + // run & init are manually disabled, because they create infinite loops and other dodgy situations + if(!$this->checkAccessAction($this->action) || in_array(strtolower($this->action), array('run', 'init'))) { user_error("Disallowed action: '$this->action' on controller '$this->class'", E_USER_ERROR); }