aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Utils.py
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2016-04-09 21:53:04 -0700
committerMark Sapiro <mark@msapiro.net>2016-04-09 21:53:04 -0700
commit35720b98bdaff9ad565fc2775f2b5aba918c52c9 (patch)
tree3767931346593a07c6ba8a1c7b137cd28505f2a2 /Mailman/Utils.py
parent325a8d245275d421094f71eb026801a0bc1b8a5f (diff)
downloadmailman2-35720b98bdaff9ad565fc2775f2b5aba918c52c9.tar.gz
mailman2-35720b98bdaff9ad565fc2775f2b5aba918c52c9.tar.xz
mailman2-35720b98bdaff9ad565fc2775f2b5aba918c52c9.zip
Use rfind rather than find to find '@' for domain splitting.
Diffstat (limited to 'Mailman/Utils.py')
-rw-r--r--Mailman/Utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index f6cf607e..892bb5c8 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -1241,7 +1241,8 @@ def IsDMARCProhibited(mlist, email):
return False
email = email.lower()
- at_sign = email.find('@')
+ # Scan from the right in case quoted local part has an '@'.
+ at_sign = email.rfind('@')
if at_sign < 1:
return False
f_dom = email[at_sign+1:]