From f528a44865351130e427769841484a9003eeb459 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 22 Nov 2017 20:34:57 +0100 Subject: [PATCH] Fix dict iteration bug in dnsrecord_show In structured mode, dict size is modified by del record[attr]. https://pagure.io/freeipa/issue/7275 Signed-off-by: Christian Heimes Reviewed-By: Florence Blanc-Renaud --- ipaserver/plugins/dns.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipaserver/plugins/dns.py b/ipaserver/plugins/dns.py index 1d69cede0..21af74095 100644 --- a/ipaserver/plugins/dns.py +++ b/ipaserver/plugins/dns.py @@ -3206,7 +3206,7 @@ class dnsrecord(LDAPObject): def postprocess_record(self, record, **options): if options.get('structured', False): - for attr in record.keys(): + for attr in tuple(record.keys()): # attributes in LDAPEntry may not be normalized attr = attr.lower() try: