]> source.dussan.org Git - nextcloud-server.git/commitdiff
allow 'Nextcloud' in the user agent string of Android
authorBjoern Schiessle <bjoern@schiessle.org>
Tue, 12 Dec 2017 11:16:01 +0000 (12:16 +0100)
committerBjoern Schiessle <bjoern@schiessle.org>
Tue, 12 Dec 2017 13:38:36 +0000 (14:38 +0100)
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
lib/public/IRequest.php
tests/lib/AppFramework/Http/RequestTest.php

index 98d8f5bb83a4ee853b132d4d7ec397299c85390c..83cf4c6914755bbc9915afae292c78da16734782 100644 (file)
@@ -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
index f80bffcb4804fa05e92a63672cdb97a2b0b91268..40a9193dc920e495de182be72b86a0635b760b69 100644 (file)
@@ -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,
+                       ],
                ];
        }