allow 'Nextcloud' in the user agent string of Android

Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
pull/7462/head
Bjoern Schiessle 8 years ago
parent 134bd51fe6
commit f0202245ee
No known key found for this signature in database
GPG Key ID: 2378A753E2BF04F6
  1. 2
      lib/public/IRequest.php
  2. 14
      tests/lib/AppFramework/Http/RequestTest.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

@ -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,
],
];
}

Loading…
Cancel
Save