Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/base.php b/lib/base.php
index 42e1d7f8586..98305a19df2 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -463,13 +463,15 @@ class OC {
$useCustomSession = false;
$session = self::$server->getSession();
OC_Hook::emit('OC', 'initSession', array('session' => &$session, 'sessionName' => &$sessionName, 'useCustomSession' => &$useCustomSession));
- if($useCustomSession) {
- // use the session reference as the new Session
- self::$server->setSession($session);
- } else {
+ if (!$useCustomSession) {
// set the session name to the instance id - which is unique
- self::$server->setSession(new \OC\Session\Internal($sessionName));
+ $session = new \OC\Session\Internal($sessionName);
}
+
+ $cryptoWrapper = \OC::$server->getSessionCryptoWrapper();
+ $session = $cryptoWrapper->wrapSession($session);
+ self::$server->setSession($session);
+
// if session cant be started break with http 500 error
} catch (Exception $e) {
\OCP\Util::logException('base', $e);