Add nonce for Safari 12+

As far as I can tell this should work now.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-10-21 20:48:12 +02:00
parent f544c9fec9
commit 0fdc65a15c
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 2 additions and 0 deletions

View File

@ -74,6 +74,8 @@ class ContentSecurityPolicyNonceManager {
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)) {