diff --git a/api/src/Sharing.php b/api/src/Sharing.php index 496b2ed928..b6e801156d 100644 --- a/api/src/Sharing.php +++ b/api/src/Sharing.php @@ -507,7 +507,7 @@ class Sharing public function ServeRequest() { // sharing is for a different share, change to current share - if (empty($this->share['skip_validate_token']) && $this->share['share_token'] !== self::get_token()) + if (empty($this->share['skip_validate_token']) && self::get_token() && $this->share['share_token'] !== self::get_token()) { // 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' &&