Skip to content

Commit 26a4435

Browse files
authored
Merge pull request #33070 from nextcloud/backport/33065/stable23
[stable23] Fix detection of firefox in ContentSecurityPolicyNonceManager
2 parents 36aff74 + 8ec3c26 commit 26a4435

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,8 @@ public function getNonce(): string {
8080
public function browserSupportsCspV3(): bool {
8181
$browserWhitelist = [
8282
Request::USER_AGENT_CHROME,
83-
// Firefox 45+
84-
'/^Mozilla\/5\.0 \([^)]+\) Gecko\/[0-9.]+ Firefox\/(4[5-9]|[5-9][0-9])\.[0-9.]+$/',
85-
// Safari 12+
86-
'/^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]+$/',
83+
Request::USER_AGENT_FIREFOX,
84+
Request::USER_AGENT_SAFARI,
8785
];
8886

8987
if ($this->request->isUserAgent($browserWhitelist)) {

0 commit comments

Comments
 (0)