FIX doInit comparison should be lowercased

This commit is contained in:
Daniel Hensby 2019-03-05 19:01:12 +00:00
parent b59aeaf802
commit 7416ce275b
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E

View File

@ -195,7 +195,7 @@ class RequestHandler extends ViewableData
if (!$this->hasAction($action)) {
return $this->httpError(404, "Action '$action' isn't available $classMessage.");
}
if (!$this->checkAccessAction($action) || in_array(strtolower($action), array('run', 'doInit'))) {
if (!$this->checkAccessAction($action) || in_array(strtolower($action), array('run', 'doinit'))) {
return $this->httpError(403, "Action '$action' isn't allowed $classMessage.");
}
$result = $this->handleAction($request, $action);
@ -410,7 +410,7 @@ class RequestHandler extends ViewableData
$actionsWithoutExtra = $this->config()->get('allowed_actions', true);
if (!is_array($actions) || !$actionsWithoutExtra) {
if ($action != 'doInit' && $action != 'run' && method_exists($this, $action)) {
if (!in_array(strtolower($action), array('run', 'doinit')) && method_exists($this, $action)) {
return true;
}
}