1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-01-24 12:47:05 +00:00

Fixed FURB142 (for-loop-set-mutations): Use of set.add() in a for loop

This commit is contained in:
Teal Dulcet 2025-01-08 05:13:11 -08:00
parent 3646227873
commit 8a9d137dd3

View File

@ -671,8 +671,7 @@ def get_certificate_domains(cert):
try:
sans = cert.extensions.get_extension_for_oid(OID_SUBJECT_ALTERNATIVE_NAME).value.get_values_for_type(DNSName)
for san in sans:
names.add(idna_decode_dns_name(san))
names.update(idna_decode_dns_name(san) for san in sans)
except ExtensionNotFound:
pass