diff --git a/advanced/index.php b/advanced/index.php index cad59ec7..f104bcf6 100644 --- a/advanced/index.php +++ b/advanced/index.php @@ -8,6 +8,8 @@ // Sanitise HTTP_HOST output $serverName = htmlspecialchars($_SERVER["HTTP_HOST"]); +// Remove external ipv6 brackets if any +$serverName = preg_replace('/^\[(.*)\]$/', '${1}', $serverName); if (!is_file("/etc/pihole/setupVars.conf")) die("[ERROR] File not found: /etc/pihole/setupVars.conf");