summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-11-02 13:52:50 +0100
committerGitHub <noreply@github.com>2018-11-02 13:52:50 +0100
commit7ba8700ba1df4762bd9f5c6647cdaedc6e194fe2 (patch)
tree640925f2b522704971188ae308b9fd48bc2e6c70 /apps/dav
parent88cf60a1492a9d897f439f88189a41151845ac14 (diff)
parent0efd29f41f924f2b48ef4dc87b8420401db49746 (diff)
downloadnextcloud-server-7ba8700ba1df4762bd9f5c6647cdaedc6e194fe2.tar.gz
nextcloud-server-7ba8700ba1df4762bd9f5c6647cdaedc6e194fe2.zip
Merge pull request #12148 from nextcloud/suppress-wrong-audit-log-message
suppress wrong audit log messages about failed login attempts
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/Connector/Sabre/Auth.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/dav/lib/Connector/Sabre/Auth.php b/apps/dav/lib/Connector/Sabre/Auth.php
index fcd1b34edbc..292be61c9dc 100644
--- a/apps/dav/lib/Connector/Sabre/Auth.php
+++ b/apps/dav/lib/Connector/Sabre/Auth.php
@@ -228,11 +228,12 @@ class Auth extends AbstractBasic {
if($this->twoFactorManager->needsSecondFactor($this->userSession->getUser())) {
throw new \Sabre\DAV\Exception\NotAuthenticated('2FA challenge not passed.');
}
- if (\OC_User::handleApacheAuth() ||
+ if (
//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() && $request->getHeader('Authorization') === null) ||
+ \OC_User::handleApacheAuth()
) {
$user = $this->userSession->getUser()->getUID();
\OC_Util::setupFS($user);