summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-11-13 15:10:17 +0100
committerGitHub <noreply@github.com>2018-11-13 15:10:17 +0100
commitfb559ed05e25a40536eeecd0c1d986eb9513764b (patch)
tree3ff06fd18f16a6784c6456e030cc5c6f6a77bbbc /apps/dav
parentdb9e1b90f92cb0ad31aa443e2e4cbe6f4e10d8e4 (diff)
parent1eaa4b443f4ae15f041ed8e40e6f4aa3106be8bf (diff)
downloadnextcloud-server-fb559ed05e25a40536eeecd0c1d986eb9513764b.tar.gz
nextcloud-server-fb559ed05e25a40536eeecd0c1d986eb9513764b.zip
Merge pull request #12372 from nextcloud/suppress-wrong-audit-log-message-stable14
[stable14] 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);