From f15ca3acb4f4aa8e5af830dfa0dd72354655a18f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 1 Jun 2022 16:58:32 +0200 Subject: [PATCH] Revert "Revert "Reject empty `controller` in ControllerMap::resolveCustomController()"" This check will now work correctly, since the custom URL for non-i18n pages is no longer cleared since the previous commit. This reverts commit bd46b32207b5784c481277f4c2a8c81deff49f9c. --- .../install/files/lib/system/request/ControllerMap.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wcfsetup/install/files/lib/system/request/ControllerMap.class.php b/wcfsetup/install/files/lib/system/request/ControllerMap.class.php index 011a3bf1f9..f5f1aa70bb 100644 --- a/wcfsetup/install/files/lib/system/request/ControllerMap.class.php +++ b/wcfsetup/install/files/lib/system/request/ControllerMap.class.php @@ -141,6 +141,10 @@ class ControllerMap extends SingletonFactory */ public function resolveCustomController($application, $controller) { + if ($controller === '') { + throw new \InvalidArgumentException('The given controller must not be empty.'); + } + if (isset($this->applicationOverrides['lookup'][$application][$controller])) { $application = $this->applicationOverrides['lookup'][$application][$controller]; } -- 2.20.1