]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix safari useragent for versions with 3 digits 19966/head
authorPavel Krasikov <klonishe@gmail.com>
Sat, 14 Mar 2020 13:19:57 +0000 (16:19 +0300)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Sun, 15 Mar 2020 12:16:49 +0000 (12:16 +0000)
Signed-off-by: Pavel Krasikov <klonishe@gmail.com>
lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php

index 773cde18a9a0b4ef61074a286f7a2418dc3b9d15..7298fbe2eda30715e20b3de37dca5271a35a49ac 100644 (file)
@@ -82,7 +82,7 @@ class ContentSecurityPolicyNonceManager {
                        // 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]+$/',
+                       '/^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]+$/',
                ];
 
                if($this->request->isUserAgent($browserWhitelist)) {