From 011293191d36552a12c801247297410c188e9030 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 8 Aug 2022 10:54:57 +0200 Subject: [PATCH] Remove the `SECURITY_TOKEN` PHP constants These are trivially replaced by the `{csrfToken}` template tag which was backported all the way to 5.2. see #3612 --- .../system/session/SessionHandler.class.php | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php index 8967a4e670..3accd7342d 100644 --- a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php +++ b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php @@ -400,8 +400,6 @@ final class SessionHandler extends SingletonFactory */ public function initSession() { - $this->defineConstants(); - // assign language $this->languageID = $this->getVar('languageID') ?: $this->user->languageID; @@ -428,23 +426,6 @@ final class SessionHandler extends SingletonFactory $this->disableTracking = true; } - /** - * Defines global wcf constants related to session. - */ - protected function defineConstants() - { - // security token - if (!\defined('SECURITY_TOKEN')) { - \define('SECURITY_TOKEN', $this->getSecurityToken()); - } - if (!\defined('SECURITY_TOKEN_INPUT_TAG')) { - \define( - 'SECURITY_TOKEN_INPUT_TAG', - '' - ); - } - } - /** * Initializes security token. */ -- 2.20.1