Skip to content

Commit

Permalink
Merge pull request #11966 from nextcloud/csp/safari12-support
Browse files Browse the repository at this point in the history
Add nonce for Safari 12+
  • Loading branch information
MorrisJobke authored Oct 23, 2018
2 parents 869df2e + 0fdc65a commit 92b5b54
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ public function browserSupportsCspV3(): bool {
Request::USER_AGENT_CHROME,
// Firefox 45+
'/^Mozilla\/5\.0 \([^)]+\) Gecko\/[0-9.]+ Firefox\/(4[5-9]|[5-9][0-9])\.[0-9.]+$/',
// Safari 12+
'/^Mozilla\/5\.0 \([^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\) Version\/(1[2-9]|[2-9][0-9])\.[0-9]+ Safari\/[0-9.A-Z]+$/',
];

if($this->request->isUserAgent($browserWhitelist)) {
Expand Down

0 comments on commit 92b5b54

Please sign in to comment.