diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-12-12 12:16:01 +0100 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2017-12-12 12:16:01 +0100 |
commit | f0202245ee7a74790522bc67ce3f5e44afd82a91 (patch) | |
tree | 8a70af0c2e34af9280e639377762ff0185791155 | |
parent | 134bd51fe6e5cd19b610eaa6da53b2819f6db3c4 (diff) | |
download | nextcloud-server-f0202245ee7a74790522bc67ce3f5e44afd82a91.tar.gz nextcloud-server-f0202245ee7a74790522bc67ce3f5e44afd82a91.zip |
allow 'Nextcloud' in the user agent string of Android
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
-rw-r--r-- | lib/public/IRequest.php | 2 | ||||
-rw-r--r-- | tests/lib/AppFramework/Http/RequestTest.php | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/lib/public/IRequest.php b/lib/public/IRequest.php index c4f59f85d4a..a14b6b5f459 100644 --- a/lib/public/IRequest.php +++ b/lib/public/IRequest.php @@ -67,7 +67,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 13.0.0 diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php index d3f36a6d886..cc55e33f354 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, + ], ]; } |