From f76f3caefb35b14838f783e48ff3e3b44c91e196 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Fri, 3 Jun 2016 15:14:23 +0200 Subject: [PATCH] make group digest stable if we had mulitple security groups and wanted to edit one, we did not have a stable digest, because perl hashes are not sorted this patch sorts the keys before hashing Signed-off-by: Dominik Csapak --- src/PVE/API2/Firewall/Groups.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/API2/Firewall/Groups.pm b/src/PVE/API2/Firewall/Groups.pm index e8f2116..99ea418 100644 --- a/src/PVE/API2/Firewall/Groups.pm +++ b/src/PVE/API2/Firewall/Groups.pm @@ -16,7 +16,7 @@ my $get_security_group_list = sub { my ($cluster_conf) = @_; my $res = []; - foreach my $group (keys %{$cluster_conf->{groups}}) { + foreach my $group (sort keys %{$cluster_conf->{groups}}) { my $data = { group => $group, }; -- 2.39.2