Skip to content

Commit 7ba8700

Browse files
authored
Merge pull request #12148 from nextcloud/suppress-wrong-audit-log-message
suppress wrong audit log messages about failed login attempts
2 parents 88cf60a + 0efd29f commit 7ba8700

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

apps/dav/lib/Connector/Sabre/Auth.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,12 @@ private function auth(RequestInterface $request, ResponseInterface $response) {
228228
if($this->twoFactorManager->needsSecondFactor($this->userSession->getUser())) {
229229
throw new \Sabre\DAV\Exception\NotAuthenticated('2FA challenge not passed.');
230230
}
231-
if (\OC_User::handleApacheAuth() ||
231+
if (
232232
//Fix for broken webdav clients
233233
($this->userSession->isLoggedIn() && is_null($this->session->get(self::DAV_AUTHENTICATED))) ||
234234
//Well behaved clients that only send the cookie are allowed
235-
($this->userSession->isLoggedIn() && $this->session->get(self::DAV_AUTHENTICATED) === $this->userSession->getUser()->getUID() && $request->getHeader('Authorization') === null)
235+
($this->userSession->isLoggedIn() && $this->session->get(self::DAV_AUTHENTICATED) === $this->userSession->getUser()->getUID() && $request->getHeader('Authorization') === null) ||
236+
\OC_User::handleApacheAuth()
236237
) {
237238
$user = $this->userSession->getUser()->getUID();
238239
\OC_Util::setupFS($user);

0 commit comments

Comments
 (0)