]> source.dussan.org Git - nextcloud-server.git/commitdiff
improve error handling of webdavauth
authorGeorg Ehrke <georg@ownCloud.com>
Fri, 21 Jun 2013 12:39:04 +0000 (14:39 +0200)
committerGeorg Ehrke <georg@ownCloud.com>
Fri, 21 Jun 2013 12:39:04 +0000 (14:39 +0200)
apps/user_webdavauth/user_webdavauth.php

index 146034a5d43c496d4bdd483ea4203a2f5ef673f7..86e5b916f3d26fa91872cd7247a8c7870d16bbf7 100755 (executable)
@@ -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;
                }
 
        }