From 7e6f4f91a04851b0114b24a45d337c3c5e4f2004 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 2 Mar 2024 14:35:22 -0800 Subject: [PATCH] Handle IPv6 addresses in access control --- virtualmin-nginx-lib.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/virtualmin-nginx-lib.pl b/virtualmin-nginx-lib.pl index 580612b..4791b5c 100644 --- a/virtualmin-nginx-lib.pl +++ b/virtualmin-nginx-lib.pl @@ -1063,6 +1063,8 @@ sub nginx_access_parse &check_ipaddress($addr) || $addr =~ /^(\S+)\/(\d+)$/ && &check_ipaddress("$1") && $2 > 0 && $2 <= 32 || + &check_ip6address($addr) || + $addr =~ /^(\S+)\/(\d+)$/ && &check_ip6address("$1") || &error(&text('access_eaddr', $addr)); } push(@obj, { 'name' => $mode,