]> git.joonet.de Git - adminer.git/commitdiff
Rely on noreferrer in Firefox too
authorJakub Vrana <jakub@vrana.cz>
Wed, 1 Mar 2017 10:35:01 +0000 (11:35 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 1 Mar 2017 10:35:01 +0000 (11:35 +0100)
adminer/include/functions.inc.php

index 97027f6543d445d0cc8e79396a95714a8ef12c1e..eb3d22c55469bae9f4d893008d1104923d3683f4 100644 (file)
@@ -1144,7 +1144,7 @@ function select_value($val, $link, $field, $text_length) {
                        $link = "mailto:$val";
                }
                if ($protocol = is_url($val)) {
-                       $link = (($protocol == "http" && $HTTPS) || preg_match('~WebKit~i', $_SERVER["HTTP_USER_AGENT"]) // WebKit supports noreferrer since 2009
+                       $link = (($protocol == "http" && $HTTPS) || preg_match('~WebKit|Firefox~i', $_SERVER["HTTP_USER_AGENT"]) // WebKit supports noreferrer since 2009, Firefox since version 38
                                ? $val // HTTP links from HTTPS pages don't receive Referer automatically
                                : "https://www.adminer.org/redirect/?url=" . urlencode($val) // intermediate page to hide Referer
                        );