Remove hook for initSession

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>
This commit is contained in:
Morris Jobke 2020-07-07 21:42:20 +02:00
parent 09b9f94c38
commit 8d2d051841
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with 2 additions and 8 deletions

View 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);