The regexp of the Freebox user agent is now more strict.

A new unit test has been added in consequence.
This commit is contained in:
Martial Saunois 2014-01-29 10:58:34 +01:00
Родитель 8507efc427
Коммит 0f1c587e6b
2 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -11,7 +11,7 @@ class OC_Request {
const USER_AGENT_IE = '/MSIE/'; const USER_AGENT_IE = '/MSIE/';
// Android Chrome user agent: https://developers.google.com/chrome/mobile/docs/user-agent // 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_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 * @brief Check overwrite condition

Просмотреть файл

@ -128,6 +128,11 @@ class Test_Request extends PHPUnit_Framework_TestCase {
OC_Request::USER_AGENT_FREEBOX, OC_Request::USER_AGENT_FREEBOX,
true true
), ),
array(
'Fake Mozilla/5.0',
OC_Request::USER_AGENT_FREEBOX,
false
),
); );
} }
} }