File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed
apps/dav/tests/unit/Connector/Sabre
tests/lib/AppFramework/Http Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -301,7 +301,7 @@ public function testAuthenticateAlreadyLoggedInWithoutCsrfTokenAndCorrectlyDavAu
301301 ->method ('isUserAgent ' )
302302 ->with ([
303303 '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/ ' ,
304- '/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/ ' ,
304+ '/^Mozilla\/5\.0 \(Android\) ( ownCloud|Nextcloud) \-android.*$/ ' ,
305305 '/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/ ' ,
306306 ])
307307 ->willReturn (false );
@@ -405,7 +405,7 @@ public function testAuthenticateAlreadyLoggedInWithoutCsrfTokenAndIncorrectlyDav
405405 ->method ('isUserAgent ' )
406406 ->with ([
407407 '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/ ' ,
408- '/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/ ' ,
408+ '/^Mozilla\/5\.0 \(Android\) ( ownCloud|Nextcloud) \-android.*$/ ' ,
409409 '/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/ ' ,
410410 ])
411411 ->willReturn (false );
@@ -451,7 +451,7 @@ public function testAuthenticateAlreadyLoggedInWithoutCsrfTokenForNonGetAndDeskt
451451 ->method ('isUserAgent ' )
452452 ->with ([
453453 '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/ ' ,
454- '/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/ ' ,
454+ '/^Mozilla\/5\.0 \(Android\) ( ownCloud|Nextcloud) \-android.*$/ ' ,
455455 '/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/ ' ,
456456 ])
457457 ->willReturn (true );
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ interface IRequest {
6666 /**
6767 * @since 9.1.0
6868 */
69- const USER_AGENT_CLIENT_ANDROID = '/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/ ' ;
69+ const USER_AGENT_CLIENT_ANDROID = '/^Mozilla\/5\.0 \(Android\) ( ownCloud|Nextcloud) \-android.*$/ ' ;
7070
7171 /**
7272 * @since 9.1.0
Original file line number Diff line number Diff line change @@ -859,6 +859,20 @@ function userAgentProvider() {
859859 ],
860860 false ,
861861 ],
862+ [
863+ 'Mozilla/5.0 (Android) ownCloud-android/2.0.0 ' ,
864+ [
865+ Request::USER_AGENT_CLIENT_ANDROID
866+ ],
867+ true ,
868+ ],
869+ [
870+ 'Mozilla/5.0 (Android) Nextcloud-android/2.0.0 ' ,
871+ [
872+ Request::USER_AGENT_CLIENT_ANDROID
873+ ],
874+ true ,
875+ ],
862876 ];
863877 }
864878
You can’t perform that action at this time.
0 commit comments