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 b034979 commit b9e68eeCopy full SHA for b9e68ee
system/Router/AutoRouterImproved.php
@@ -242,6 +242,13 @@ public function getRoute(string $uri): array
242
$this->method = $method;
243
$this->params = $params;
244
245
+ // Prevent access to default controller's method
246
+ if (strtolower($baseControllerName) === strtolower($this->defaultController)) {
247
+ throw new PageNotFoundException(
248
+ 'Cannot access the default controller "' . $this->controller . '::' . $this->method . '"'
249
+ );
250
+ }
251
+
252
// Prevent access to default method path
253
if (strtolower($this->method) === strtolower($this->defaultMethod)) {
254
throw new PageNotFoundException(
0 commit comments