Deprecated SessionHandler::setCookieSuffix()
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 2 Oct 2020 13:48:57 +0000 (15:48 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 15 Oct 2020 14:01:21 +0000 (16:01 +0200)
wcfsetup/install/files/lib/system/WCFACP.class.php
wcfsetup/install/files/lib/system/session/SessionHandler.class.php

index 9f7924ea040f72f3cc18ddd65e15797201e08e9a..d944832daef147c19f8f422a6c564991f08e09a1 100644 (file)
@@ -188,7 +188,6 @@ class WCFACP extends WCF {
         */
        protected function initSession() {
                self::$sessionObj = SessionHandler::getInstance();
-               self::$sessionObj->setCookieSuffix('_acp');
                
                $factory = new ACPSessionFactory();
                $factory->load();
index 1cf1077d02d76cb5f64d4457c93d46f8a24679da..4b34e442c674eaf038165a3b4a17fbd8e7339839 100644 (file)
@@ -167,16 +167,14 @@ final class SessionHandler extends SingletonFactory {
        protected function init() {
                $this->isACP = (class_exists(WCFACP::class, false) || !PACKAGE_ID);
                $this->usersOnlyPermissions = UserGroupOptionCacheBuilder::getInstance()->getData([], 'usersOnlyOptions');
+               
+               $this->cookieSuffix = ($this->isACP ? '_acp' : '');
        }
        
        /**
-        * Suffix used to tell ACP and frontend cookies apart
-        * 
-        * @param       string  $cookieSuffix   cookie suffix
+        * @deprecated 5.4 - This method is a noop. The cookie suffix is determined automatically.
         */
-       public function setCookieSuffix($cookieSuffix) {
-               $this->cookieSuffix = $cookieSuffix;
-       }
+       public function setCookieSuffix() { }
        
        /**
         * Sets a boolean value to determine if the client provided a valid session cookie.