From 390f92b145839794286e030ff63f85ee7031cf2a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 27 May 2022 15:19:17 +0200 Subject: [PATCH] Require a `controller` for non-`wcf` links in ACP --- .../install/files/lib/system/request/LinkHandler.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wcfsetup/install/files/lib/system/request/LinkHandler.class.php b/wcfsetup/install/files/lib/system/request/LinkHandler.class.php index 6b78b7e0c8..0cf5376744 100644 --- a/wcfsetup/install/files/lib/system/request/LinkHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/LinkHandler.class.php @@ -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); -- 2.20.1