From: Georg Ehrke Date: Fri, 21 Jun 2013 12:39:04 +0000 (+0200) Subject: improve error handling of webdavauth X-Git-Tag: v5.0.8~60 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fee313e25674e7d9dd6a126d21b7e1989f163bf0;p=nextcloud-server.git improve error handling of webdavauth --- diff --git a/apps/user_webdavauth/user_webdavauth.php b/apps/user_webdavauth/user_webdavauth.php index 6417e45434d..0d7ae0443dc 100755 --- a/apps/user_webdavauth/user_webdavauth.php +++ b/apps/user_webdavauth/user_webdavauth.php @@ -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; } }