Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/private/request.php2
-rw-r--r--tests/lib/request.php5
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/request.php b/lib/private/request.php
index 855148ac25a..2c5b907846e 100755
--- a/lib/private/request.php
+++ b/lib/private/request.php
@@ -11,7 +11,7 @@ class OC_Request {
const USER_AGENT_IE = '/MSIE/';
// Android Chrome user agent: https://developers.google.com/chrome/mobile/docs/user-agent
const USER_AGENT_ANDROID_MOBILE_CHROME = '#Android.*Chrome/[.0-9]*#';
- const USER_AGENT_FREEBOX = '#Mozilla/5\.0$#';
+ const USER_AGENT_FREEBOX = '#^Mozilla/5\.0$#';
/**
* @brief Check overwrite condition
diff --git a/tests/lib/request.php b/tests/lib/request.php
index 3cb58674d3e..1d77acc70ae 100644
--- a/tests/lib/request.php
+++ b/tests/lib/request.php
@@ -128,6 +128,11 @@ class Test_Request extends PHPUnit_Framework_TestCase {
OC_Request::USER_AGENT_FREEBOX,
true
),
+ array(
+ 'Fake Mozilla/5.0',
+ OC_Request::USER_AGENT_FREEBOX,
+ false
+ ),
);
}
}