From: Fabian Grünbichler Date: Wed, 29 Apr 2020 08:52:56 +0000 (+0200) Subject: rules: verify referenced security group exists X-Git-Url: https://git.proxmox.com/?p=pve-firewall.git;a=commitdiff_plain;h=312ae5161f80d7cd600d9a182eb0b70492489a05 rules: verify referenced security group exists while this was already handled properly (as empty rules), adding this as error makes it much more visible (in the GUI as well). Signed-off-by: Fabian Grünbichler --- diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm index e349ee7..aa4fb01 100644 --- a/src/PVE/Firewall.pm +++ b/src/PVE/Firewall.pm @@ -1623,6 +1623,8 @@ sub verify_rule { if !$allow_groups; &$add_error('action', "invalid characters in security group name") if $action && ($action !~ m/^${security_group_name_pattern}$/); + &$add_error('action', "security group '$action' does not exist") + if $action && !defined($cluster_conf->{groups}->{$action}); } else { &$add_error('type', "unknown rule type '$type'"); }