瀏覽代碼

[Web] Fix transport check for IPv6 addresses, thanks to marekschneider

andryyy 4 年之前
父節點
當前提交
8e38adf2f6
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      data/web/inc/ajax/transport_check.php

+ 1 - 1
data/web/inc/ajax/transport_check.php

@@ -42,7 +42,7 @@ if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == "admi
       $port = substr($hostname_w_port, strrpos($hostname_w_port, ':') + 1);
       $hostname = preg_replace('/'. preg_quote(':' . $port, '/') . '$/', '', $hostname_w_port);
       if (filter_var($hostname, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
-        $hostname = '[' . $hostname . ']:';
+        $hostname = '[' . $hostname . ']';
       }
     }
     else {