From be7e9c123fb18a49caaf6129bd953be2ae99334f Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 25 Feb 2019 11:25:31 -0700 Subject: [PATCH] * Api - fix authentication loop with password protected email download links --- api/src/Sharing.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/Sharing.php b/api/src/Sharing.php index 9a7e0636c5..77bfb93768 100644 --- a/api/src/Sharing.php +++ b/api/src/Sharing.php @@ -195,9 +195,9 @@ class Sharing // check password, if required if ($share['share_passwd'] && (empty($_SERVER['PHP_AUTH_PW']) || - !(Api\Auth::compare_password($_SERVER['PHP_AUTH_PW'], $share['share_passwd'], 'crypt') || - Api\Header\Authenticate::decode_password($_SERVER['PHP_AUTH_PW']) && - Api\Auth::compare_password($_SERVER['PHP_AUTH_PW'], $share['share_passwd'], 'crypt')))) + !(Auth::compare_password($_SERVER['PHP_AUTH_PW'], $share['share_passwd'], 'crypt') || + Header\Authenticate::decode_password($_SERVER['PHP_AUTH_PW']) && + Auth::compare_password($_SERVER['PHP_AUTH_PW'], $share['share_passwd'], 'crypt')))) { $realm = 'EGroupware share '.$share['share_token']; header('WWW-Authenticate: Basic realm="'.$realm.'"');