mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-18 18:07:22 +01:00
Fixed PIE810 (multiple-starts-ends-with): Call startswith once with a tuple
This commit is contained in:
committed by
Joshua Tauberer
parent
dd61844ced
commit
555ecc1ebb
@@ -87,7 +87,7 @@ def prettify_idn_email_address(email):
|
||||
def is_dcv_address(email):
|
||||
email = email.lower()
|
||||
for localpart in ("admin", "administrator", "postmaster", "hostmaster", "webmaster", "abuse"):
|
||||
if email.startswith(localpart+"@") or email.startswith(localpart+"+"):
|
||||
if email.startswith((localpart + "@", localpart + "+")):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user