From 35720b98bdaff9ad565fc2775f2b5aba918c52c9 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Sat, 9 Apr 2016 21:53:04 -0700 Subject: Use rfind rather than find to find '@' for domain splitting. --- Mailman/Utils.py | 3 ++- NEWS | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) 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:] diff --git a/NEWS b/NEWS index 5deb83cc..0c95a8b9 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,9 @@ Here is a history of user visible changes to Mailman. Bug fixes and other patches + - DMARC mitigations will now find the From: domain to the right of the + rightmost '@' rather than the leftmost '@'. (LP: #1568445) + - DMARC mitigations for a sub-domain of an organizational domain will now use the organizational domain's sp= policy if any. (LP: #1568398) -- cgit v1.2.3