public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [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

* applied: [PATCH api] pmgbanner: fix URL IPv6 address formatting
  2026-06-09  8:35 [PATCH api] pmgbanner: fix URL IPv6 address formatting Gabriel Goller
@ 2026-06-09  9:30 ` Stoiko Ivanov
  0 siblings, 0 replies; 2+ messages in thread
From: Stoiko Ivanov @ 2026-06-09  9:30 UTC (permalink / raw)
  To: pmg-devel, Gabriel Goller

Nice catch - Thanks for the patch!

gave it a quick spin on a container installation and applied it!

On Tue, 09 Jun 2026 10:35:16 +0200, Gabriel Goller wrote:
> 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
> 
> [...]

Applied, thanks!

[1/1] pmgbanner: fix URL IPv6 address formatting
      commit: 738626e1b8ce5485e8a88efeb4b56410554ea353





^ permalink raw reply	[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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal