Skip to content

Commit

Permalink
Merge pull request #10586 from nextcloud/fix/noid/check_if_ua_is_set
Browse files Browse the repository at this point in the history
Check if HTTP_USER_AGENT is set before using it
  • Loading branch information
rullzer committed Aug 8, 2018
2 parents 3884038 + c74a525 commit e7e30ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/private/legacy/util.php
Original file line number Diff line number Diff line change
Expand Up @@ -1535,6 +1535,10 @@ public static function needUpgrade(\OC\SystemConfig $config) {
* @return boolean
*/
public static function isIe() {
if (!isset($_SERVER['HTTP_USER_AGENT'])) {
return false;
}

return preg_match(Request::USER_AGENT_IE, $_SERVER['HTTP_USER_AGENT']) === 1;
}

Expand Down

0 comments on commit e7e30ac

Please sign in to comment.