Require a `controller` for non-`wcf` links in ACP
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 27 May 2022 13:19:17 +0000 (15:19 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 27 May 2022 13:19:44 +0000 (15:19 +0200)
wcfsetup/install/files/lib/system/request/LinkHandler.class.php

index 6b78b7e0c8a1e3211f467a31159b908b4e161d01..0cf5376744e5392f84aae68b8b16220d6e178578 100644 (file)
@@ -170,6 +170,9 @@ class LinkHandler extends SingletonFactory
         if ($controller === null) {
             if ($isACP) {
                 $controller = 'Index';
+                if ($abbreviation !== 'wcf') {
+                    throw new \InvalidArgumentException("A 'controller' must be specified for non-'wcf' links in ACP.");
+                }
             } else {
                 if (!empty($parameters['application']) && $abbreviation !== 'wcf') {
                     $application = ApplicationHandler::getInstance()->getApplication($abbreviation);