From bb2430b495a4bfe7e8f205b97749f49ce4f59229 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 12 May 2022 12:29:34 +0200 Subject: [PATCH] Remove the `$_REQUEST['styleID']` handling Resolves #4533 --- .../install/files/lib/system/WCF.class.php | 28 +++---------------- 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index f8da53a2df..1189866f3c 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -9,7 +9,6 @@ use wcf\data\package\PackageCache; use wcf\data\package\PackageEditor; use wcf\data\page\Page; use wcf\data\page\PageCache; -use wcf\data\style\StyleAction; use wcf\page\CmsPage; use wcf\system\application\ApplicationHandler; use wcf\system\application\IApplication; @@ -24,9 +23,7 @@ use wcf\system\exception\ErrorException; use wcf\system\exception\IPrintableException; use wcf\system\exception\NamedUserException; use wcf\system\exception\ParentClassException; -use wcf\system\exception\PermissionDeniedException; use wcf\system\exception\SystemException; -use wcf\system\exception\UserInputException; use wcf\system\language\LanguageFactory; use wcf\system\package\PackageInstallationDispatcher; use wcf\system\registry\RegistryHandler; @@ -545,27 +542,10 @@ class WCF */ protected function initStyle() { - $styleID = 0; - - /** @deprecated The 'styleID' parameter is deprecated. */ - if (isset($_REQUEST['styleID'])) { - $styleID = \intval($_REQUEST['styleID']); - - try { - $action = new StyleAction([$styleID], 'changeStyle'); - $action->validateAction(); - $action->executeAction(); - } catch (PermissionDeniedException | UserInputException $e) { - $styleID = 0; - } - } - - if ($styleID === 0) { - if (self::getSession()->getUser()->userID) { - $styleID = self::getSession()->getUser()->styleID ?: 0; - } else { - $styleID = self::getSession()->getVar('styleID') ?: 0; - } + if (self::getSession()->getUser()->userID) { + $styleID = self::getSession()->getUser()->styleID ?: 0; + } else { + $styleID = self::getSession()->getVar('styleID') ?: 0; } $styleHandler = StyleHandler::getInstance(); -- 2.20.1