diff options
Diffstat (limited to 'lib/private/appframework/http/request.php')
-rw-r--r-- | lib/private/appframework/http/request.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/appframework/http/request.php b/lib/private/appframework/http/request.php index 96620838dfb..ea42c9a8967 100644 --- a/lib/private/appframework/http/request.php +++ b/lib/private/appframework/http/request.php @@ -42,7 +42,7 @@ use OCP\Security\ISecureRandom; */ class Request implements \ArrayAccess, \Countable, IRequest { - const USER_AGENT_IE = '/MSIE/'; + const USER_AGENT_IE = '/(MSIE)|(Trident)/'; const USER_AGENT_IE_8 = '/MSIE 8.0/'; // Android Chrome user agent: https://developers.google.com/chrome/mobile/docs/user-agent const USER_AGENT_ANDROID_MOBILE_CHROME = '#Android.*Chrome/[.0-9]*#'; @@ -674,6 +674,9 @@ class Request implements \ArrayAccess, \Countable, IRequest { * @return bool true if at least one of the given agent matches, false otherwise */ public function isUserAgent(array $agent) { + if (!isset($this->server['HTTP_USER_AGENT'])) { + return false; + } foreach ($agent as $regex) { if (preg_match($regex, $this->server['HTTP_USER_AGENT'])) { return true; |