From: Tim Düsterhus Date: Mon, 27 Jun 2022 14:56:56 +0000 (+0200) Subject: Strengthen check for non-instantiable classes in ControllerMap::getClassData() X-Git-Tag: 5.5.0_RC_3~16^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d4f163386219b3e682032f7d478f64605a0b9dd4;p=GitHub%2FWoltLab%2FWCF.git Strengthen check for non-instantiable classes in ControllerMap::getClassData() --- diff --git a/wcfsetup/install/files/lib/system/request/ControllerMap.class.php b/wcfsetup/install/files/lib/system/request/ControllerMap.class.php index ac0b7aa771..de01cb4297 100644 --- a/wcfsetup/install/files/lib/system/request/ControllerMap.class.php +++ b/wcfsetup/install/files/lib/system/request/ControllerMap.class.php @@ -444,9 +444,11 @@ class ControllerMap extends SingletonFactory } } - // check for abstract classes + // Verify that the class can be instantiated. This excludes + // abstract classes, interfaces, classes with a private constructor + // and more. $reflectionClass = new \ReflectionClass($className); - if ($reflectionClass->isAbstract()) { + if (!$reflectionClass->isInstantiable()) { return null; }