From 343307f703572cd241c498d37ac02e9303dd5f18 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 7 Jan 2023 12:57:09 -0800 Subject: [PATCH] localhost isn't a valid hostname --- web-lib-funcs.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index 55dbf9991..d255c65c4 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -4072,6 +4072,10 @@ if (!$main::get_system_hostname[$m]) { $fromfile = $hn; } } + if ($hn =~ /localhost/) { + # Not likely to be valid + $hn = $fromfile = undef; + } # Append domain name from DNS config if needed if ($fromfile && $fromfile !~ /\./) {