From: Bjoern Schiessle Date: Tue, 12 Dec 2017 11:16:01 +0000 (+0100) Subject: allow 'Nextcloud' in the user agent string of Android X-Git-Tag: v12.0.5RC1~27^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=003c709d25e17e76f1c4a8c0268b360ca803f245;p=nextcloud-server.git allow 'Nextcloud' in the user agent string of Android Signed-off-by: Bjoern Schiessle --- diff --git a/lib/public/IRequest.php b/lib/public/IRequest.php index 98d8f5bb83a..83cf4c69147 100644 --- a/lib/public/IRequest.php +++ b/lib/public/IRequest.php @@ -66,7 +66,7 @@ interface IRequest { /** * @since 9.1.0 */ - const USER_AGENT_CLIENT_ANDROID = '/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/'; + const USER_AGENT_CLIENT_ANDROID = '/^Mozilla\/5\.0 \(Android\) (ownCloud|Nextcloud)\-android.*$/'; /** * @since 9.1.0 diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php index f80bffcb480..40a9193dc92 100644 --- a/tests/lib/AppFramework/Http/RequestTest.php +++ b/tests/lib/AppFramework/Http/RequestTest.php @@ -859,6 +859,20 @@ class RequestTest extends \Test\TestCase { ], false, ], + [ + 'Mozilla/5.0 (Android) ownCloud-android/2.0.0', + [ + Request::USER_AGENT_CLIENT_ANDROID + ], + true, + ], + [ + 'Mozilla/5.0 (Android) Nextcloud-android/2.0.0', + [ + Request::USER_AGENT_CLIENT_ANDROID + ], + true, + ], ]; }