From efebb26b5e0a24ca44024c73ea949f76d73d183b Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Mon, 17 Jul 2023 16:38:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=AE=B9=E5=99=A8?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E7=AB=AF=E5=8F=A3=E9=80=89=E6=8B=A9=20ipv6?= =?UTF-8?q?=20=E6=A0=A1=E9=AA=8C=E9=97=AE=E9=A2=98=20(#1695)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/container/container/operate/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/container/container/operate/index.vue b/frontend/src/views/container/container/operate/index.vue index e2bf46847..c321d3fec 100644 --- a/frontend/src/views/container/container/operate/index.vue +++ b/frontend/src/views/container/container/operate/index.vue @@ -439,12 +439,12 @@ const checkPortValid = () => { } for (const port of dialogData.value.rowData!.exposedPorts) { if (port.host.indexOf(':') !== -1) { - port.hostIP = port.host.split(':')[0]; + port.hostIP = port.host.substring(0, port.host.lastIndexOf(':')); if (checkIpV4V6(port.hostIP)) { MsgError(i18n.global.t('firewall.addressFormatError')); return false; } - port.hostPort = port.host.split(':')[1]; + port.hostPort = port.host.substring(port.host.lastIndexOf(':') + 1); } else { port.hostPort = port.host; }