From: Jakub Vrana Date: Tue, 15 Apr 2025 19:43:18 +0000 (+0200) Subject: Designs: Don't sniff protocol-relative URLs X-Git-Tag: v5.3.0~44 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=7642b00877a793791487dcf746be8544a547b7d1;p=adminer.git Designs: Don't sniff protocol-relative URLs --- diff --git a/adminer/include/design.inc.php b/adminer/include/design.inc.php index 5f3d1dce..d074ca21 100644 --- a/adminer/include/design.inc.php +++ b/adminer/include/design.inc.php @@ -35,7 +35,7 @@ function page_header(string $title, string $error = "", $breadcrumb = array(), s if (strpos($url, "adminer.css") !== false) { $has_light = true; $filename = preg_replace('~\?.*~', '', $url); - if (!preg_match('~:~', $url) && is_readable($filename) && preg_match('~prefers-color-scheme:\s*dark~', file_get_contents($filename))) { + if (!preg_match('~//~', $url) && is_readable($filename) && preg_match('~prefers-color-scheme:\s*dark~', file_get_contents($filename))) { $has_dark = true; } }