From 535757bc427d91a6b96b7b3a145d83e1fefef43a Mon Sep 17 00:00:00 2001
From: Christian Seiler <christian@iwakd.de>
Date: Mon, 16 Feb 2015 23:47:39 +0100
Subject: [PATCH] DAV authentication: also use Owncloud's internal user for
 short-circuit

It still works otherwise, but without this, the performance optimization
of #13416 is defeated in these situations.
---
 lib/private/connector/sabre/auth.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/private/connector/sabre/auth.php b/lib/private/connector/sabre/auth.php
index 6f7c429fd38..ba2e7d6327b 100644
--- a/lib/private/connector/sabre/auth.php
+++ b/lib/private/connector/sabre/auth.php
@@ -52,7 +52,7 @@ class OC_Connector_Sabre_Auth extends \Sabre\DAV\Auth\Backend\AbstractBasic {
 	 */
 	protected function validateUserPass($username, $password) {
 		if (OC_User::isLoggedIn() &&
-			$this->isDavAuthenticated($username)
+			$this->isDavAuthenticated(OC_User::getUser())
 		) {
 			OC_Util::setupFS(OC_User::getUser());
 			\OC::$server->getSession()->close();
-- 
GitLab