From: Tim Düsterhus Date: Fri, 27 May 2022 13:19:17 +0000 (+0200) Subject: Require a `controller` for non-`wcf` links in ACP X-Git-Tag: 6.0.0_Alpha_1~1247^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=390f92b145839794286e030ff63f85ee7031cf2a;p=GitHub%2FWoltLab%2FWCF.git Require a `controller` for non-`wcf` links in ACP --- 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);