diff --git a/framework/yii/base/Controller.php b/framework/yii/base/Controller.php index 72eb0c8..d14c9dd 100644 --- a/framework/yii/base/Controller.php +++ b/framework/yii/base/Controller.php @@ -194,7 +194,7 @@ class Controller extends Component implements ViewContextInterface $actionMap = $this->actions(); if (isset($actionMap[$id])) { return Yii::createObject($actionMap[$id], $id, $this); - } elseif (preg_match('/^[a-z0-9\\-_]+$/', $id)) { + } elseif (preg_match('/^[a-z0-9\\-_]+$/', $id) && strpos($id, '--') === false && trim($id, '-') === $id) { $methodName = 'action' . str_replace(' ', '', ucwords(implode(' ', explode('-', $id)))); if (method_exists($this, $methodName)) { $method = new \ReflectionMethod($this, $methodName);