mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #8843 from dhensby/pulls/4.0/doinit-comparison
FIX doInit comparison should be lowercased
This commit is contained in:
commit
80f83b9043
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user