Skip to content

Commit

Permalink
[Web] Fix transport check for IPv6 addresses, thanks to marekschneider
Browse files Browse the repository at this point in the history
  • Loading branch information
andryyy committed May 20, 2021
1 parent d6a3094 commit 8e38adf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/web/inc/ajax/transport_check.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
$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 {
Expand Down

0 comments on commit 8e38adf

Please sign in to comment.