]> 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 18:38:05 +0000 (20:38 +0200)
apps/user_webdavauth/user_webdavauth.php

index 6417e45434dc4c3f23c1c12438f59a38a8001e76..0d7ae0443dc64853d49e0e3bd379a170cc6c326c 100755 (executable)
@@ -50,10 +50,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;
                }
 
        }