Merge pull request #1527 from coreos-inc/defensive-copying
Make sure to iterate over a copy of the public_keys dictionary
This commit is contained in:
commit
53115b9109
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ class InstanceKeys(object):
|
|||
keys[key.kid] = ExpiresEntry(key, key.expiration_date)
|
||||
|
||||
# Remove any expired or deleted keys from the public keys cache.
|
||||
for key in self.public_keys:
|
||||
for key in dict(self.public_keys):
|
||||
if key not in keys:
|
||||
self.public_keys.pop(key)
|
||||
|
||||
|
|
Reference in a new issue