We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17298fd commit 1fa1a19Copy full SHA for 1fa1a19
system/Router/AutoRouterImproved.php
@@ -232,6 +232,13 @@ public function getRoute(string $uri): array
232
$this->method = $method;
233
$this->params = $params;
234
235
+ // Prevent access to default controller's method
236
+ if (strtolower($baseControllerName) === strtolower($this->defaultController)) {
237
+ throw new PageNotFoundException(
238
+ 'Cannot access the default controller "' . $this->controller . '::' . $this->method . '"'
239
+ );
240
+ }
241
+
242
// Prevent access to default method path
243
if (strtolower($this->method) === strtolower($this->defaultMethod)) {
244
throw new PageNotFoundException(
0 commit comments