Skip to content

Commit

Permalink
Merge pull request #46184 from nextcloud/fix/dav-auth-check
Browse files Browse the repository at this point in the history
fix: Authorization header can be an empty string
  • Loading branch information
juliusknorr authored Jul 1, 2024
2 parents 7525edd + 4d6b4b7 commit 3b75c5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/dav/lib/Connector/Sabre/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ private function auth(RequestInterface $request, ResponseInterface $response): a
//Fix for broken webdav clients
($this->userSession->isLoggedIn() && is_null($this->session->get(self::DAV_AUTHENTICATED))) ||
//Well behaved clients that only send the cookie are allowed
($this->userSession->isLoggedIn() && $this->session->get(self::DAV_AUTHENTICATED) === $this->userSession->getUser()->getUID() && $request->getHeader('Authorization') === null) ||
($this->userSession->isLoggedIn() && $this->session->get(self::DAV_AUTHENTICATED) === $this->userSession->getUser()->getUID() && empty($request->getHeader('Authorization'))) ||
\OC_User::handleApacheAuth()
) {
$user = $this->userSession->getUser()->getUID();
Expand Down

0 comments on commit 3b75c5b

Please sign in to comment.