diff options
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/Auth.php | 7 | ||||
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/AuthTest.php | 8 |
2 files changed, 7 insertions, 8 deletions
diff --git a/apps/dav/lib/Connector/Sabre/Auth.php b/apps/dav/lib/Connector/Sabre/Auth.php index 95222dafec9..93d8b14d9c9 100644 --- a/apps/dav/lib/Connector/Sabre/Auth.php +++ b/apps/dav/lib/Connector/Sabre/Auth.php @@ -32,7 +32,6 @@ namespace OCA\DAV\Connector\Sabre; use Exception; -use OC\AppFramework\Http\Request; use OC\Authentication\Exceptions\PasswordLoginForbiddenException; use OC\Authentication\TwoFactorAuth\Manager; use OC\Security\Bruteforce\Throttler; @@ -177,9 +176,9 @@ class Auth extends AbstractBasic { // Official ownCloud clients require no checks if($this->request->isUserAgent([ - Request::USER_AGENT_OWNCLOUD_DESKTOP, - Request::USER_AGENT_OWNCLOUD_ANDROID, - Request::USER_AGENT_OWNCLOUD_IOS, + IRequest::USER_AGENT_CLIENT_DESKTOP, + IRequest::USER_AGENT_CLIENT_ANDROID, + IRequest::USER_AGENT_CLIENT_IOS, ])) { return false; } diff --git a/apps/dav/tests/unit/Connector/Sabre/AuthTest.php b/apps/dav/tests/unit/Connector/Sabre/AuthTest.php index 74b85b8a1c9..dfcb7939799 100644 --- a/apps/dav/tests/unit/Connector/Sabre/AuthTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/AuthTest.php @@ -302,7 +302,7 @@ class AuthTest extends TestCase { ->with([ '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/', '/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/', - '/^Mozilla\/5\.0 \(iOS\) ownCloud\-iOS.*$/', + '/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/', ]) ->willReturn(false); $this->session @@ -352,7 +352,7 @@ class AuthTest extends TestCase { ->with([ '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/', '/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/', - '/^Mozilla\/5\.0 \(iOS\) ownCloud\-iOS.*$/', + '/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/', ]) ->willReturn(false); $this->session @@ -406,7 +406,7 @@ class AuthTest extends TestCase { ->with([ '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/', '/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/', - '/^Mozilla\/5\.0 \(iOS\) ownCloud\-iOS.*$/', + '/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/', ]) ->willReturn(false); $this->session @@ -452,7 +452,7 @@ class AuthTest extends TestCase { ->with([ '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/', '/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/', - '/^Mozilla\/5\.0 \(iOS\) ownCloud\-iOS.*$/', + '/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/', ]) ->willReturn(true); $this->session |