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
This commit is contained in:
Sam Minnee 2008-07-18 03:54:22 +00:00
parent 4478228ff4
commit ab28c127d0

View File

@ -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);
}