From 8c0fb193e1c19edf441781cf62ecf2f49be3821a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 6 Apr 2020 09:05:39 +0200 Subject: [PATCH] fix wrong condition --- api/src/Sharing.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/src/Sharing.php b/api/src/Sharing.php index 033881c753..4ee0c7ac32 100644 --- a/api/src/Sharing.php +++ b/api/src/Sharing.php @@ -492,8 +492,9 @@ class Sharing // sharing is for a different share, change to current share if ($this->share['share_token'] !== self::get_token()) { - self::create_session($GLOBALS['egw']->session->session_flags === 'N' || - $GLOBALS['egw_info']['user']['account_lid'] === 'anonymous'); + // to keep the session we require the regular user flag "N" AND a user-name not equal to "anonymous" + self::create_session($GLOBALS['egw']->session->session_flags === 'N' && + $GLOBALS['egw_info']['user']['account_lid'] !== 'anonymous'); return $GLOBALS['egw']->sharing->ServeRequest(); }