From b0e12592957d2d2345924c0ac65e140be0e178db Mon Sep 17 00:00:00 2001
From: Georg Ehrke <georg@ownCloud.com>
Date: Fri, 21 Jun 2013 14:39:04 +0200
Subject: [PATCH] improve error handling of webdavauth

---
 apps/user_webdavauth/user_webdavauth.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/apps/user_webdavauth/user_webdavauth.php b/apps/user_webdavauth/user_webdavauth.php
index 146034a5d43..86e5b916f3d 100755
--- a/apps/user_webdavauth/user_webdavauth.php
+++ b/apps/user_webdavauth/user_webdavauth.php
@@ -56,10 +56,10 @@ class OC_USER_WEBDAVAUTH extends OC_User_Backend {
 		}
 		$returncode= substr($headers[0], 9, 3);
 
-		if(($returncode=='401') or ($returncode=='403')) {
-			return(false);
-		}else{
-			return($uid);
+		if(substr($returncode, 0, 1) === '2') {
+			return $uid;
+		} else {
+			return false;
 		}
 
 	}
-- 
GitLab