]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove hook for initSession 21739/head
authorMorris Jobke <hey@morrisjobke.de>
Tue, 7 Jul 2020 19:42:20 +0000 (21:42 +0200)
committerMorris Jobke <hey@morrisjobke.de>
Tue, 7 Jul 2020 19:44:36 +0000 (21:44 +0200)
It's not used anyways and allowed to manipulate the state of the session. Also removed the code handling this.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
lib/base.php

index 8109e47cdc07cd769159e6bf582c7c550639eb99..6d0790e92850a682c087f45b80f37993ff2af0a0 100644 (file)
@@ -419,14 +419,8 @@ class OC {
                $sessionName = OC_Util::getInstanceId();
 
                try {
-                       // Allow session apps to create a custom session object
-                       $useCustomSession = false;
-                       $session = self::$server->getSession();
-                       OC_Hook::emit('OC', 'initSession', ['session' => &$session, 'sessionName' => &$sessionName, 'useCustomSession' => &$useCustomSession]);
-                       if (!$useCustomSession) {
-                               // set the session name to the instance id - which is unique
-                               $session = new \OC\Session\Internal($sessionName);
-                       }
+                       // set the session name to the instance id - which is unique
+                       $session = new \OC\Session\Internal($sessionName);
 
                        $cryptoWrapper = \OC::$server->getSessionCryptoWrapper();
                        $session = $cryptoWrapper->wrapSession($session);