diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2022-06-30 00:57:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-30 00:57:49 +0200 |
commit | 48d88a3f604ead125021edebe11897d8aaed9450 (patch) | |
tree | b682d3f9547413e7e99e2175f885f63f22fb2922 | |
parent | 17f8aa7a50264c4160ccdd7c350cea524d9966e4 (diff) | |
parent | ca3cd5a6257b4e40a72ac9327989deb2801015a0 (diff) | |
download | nextcloud-server-48d88a3f604ead125021edebe11897d8aaed9450.tar.gz nextcloud-server-48d88a3f604ead125021edebe11897d8aaed9450.zip |
Merge pull request #33065 from nextcloud/fix/nonce-firefox-101
Fix detection of firefox in ContentSecurityPolicyNonceManager
-rw-r--r-- | lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php b/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php index f3329135727..1167b3358d2 100644 --- a/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php +++ b/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php @@ -80,10 +80,8 @@ class ContentSecurityPolicyNonceManager { public function browserSupportsCspV3(): bool { $browserWhitelist = [ 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]+(?:\.[0-9]+)? Safari\/[0-9.A-Z]+$/', + Request::USER_AGENT_FIREFOX, + Request::USER_AGENT_SAFARI, ]; if ($this->request->isUserAgent($browserWhitelist)) { |