1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-06 14:46:36 +02:00

Designs: Don't sniff protocol-relative URLs

This commit is contained in:
Jakub Vrana
2025-04-15 21:43:18 +02:00
parent 45be56e4e1
commit 7642b00877

View File

@@ -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;
}
}