* [PATCH api] pmgbanner: fix URL IPv6 address formatting
@ 2026-06-09 8:35 Gabriel Goller
2026-06-09 9:30 ` applied: " Stoiko Ivanov
0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Goller @ 2026-06-09 8:35 UTC (permalink / raw)
To: pmg-devel
Wrap IPv6 local IP address in brackets when generating the web UI
URL. Otherwise browsers (firefox and chromium tested) can't tell the
difference between port and ipv6 address segment.
Similar to the PVE patch:
https://lore.proxmox.com/20260511093554.102397-1-g.goller@proxmox.com
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
src/bin/pmgbanner | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/pmgbanner b/src/bin/pmgbanner
index 715db99e8fb9..0d442c8b0ed9 100755
--- a/src/bin/pmgbanner
+++ b/src/bin/pmgbanner
@@ -28,7 +28,8 @@ for (my $try = 1; $try <= 15; $try++) {
$addr //= '<unknown>'; # useless but we must _not_ fail here
-$banner .= " https://${addr}:8006/\n";
+my $urlip = $addr =~ m/:/ ? "[$addr]" : $addr;
+$banner .= " https://${urlip}:8006/\n";
$banner .= "\n$xline\n\n";
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-09 9:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-09 8:35 [PATCH api] pmgbanner: fix URL IPv6 address formatting Gabriel Goller
2026-06-09 9:30 ` applied: " Stoiko Ivanov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.