Skip to content

Commit

Permalink
Still setup session if a session cookie is present
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Feb 7, 2022
1 parent d349901 commit 01d5aca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,9 @@ private static function printUpgradePage(\OC\SystemConfig $systemConfig) {
}

public static function initSession() {
if (self::$server->getRequest()->getHeader('Authorization') !== '') {
if (self::$server->getRequest()->getHeader('Authorization') !== '' && !isset($_COOKIE[OC_Util::getInstanceId()])) {
// Do not initialize the session if a request is authenticated directly
// unless there is a session cookie already sent along
return;
}
if (self::$server->getRequest()->getServerProtocol() === 'https') {
Expand Down

0 comments on commit 01d5aca

Please sign in to comment.