------------------------------------------------------------
revno: 1597
fixes bug: https://launchpad.net/bugs/1536816
committer: Mark Sapiro <m...@msapiro.net>
branch nick: 2.1
timestamp: Thu 2016-01-21 14:43:42 -0800
message:
  Fixed garbled From: with DMARC mitigations and non-ascii display name.
modified:
  Mailman/Handlers/CookHeaders.py
  NEWS


--
lp:mailman/2.1
https://code.launchpad.net/~mailman-coders/mailman/2.1

Your team Mailman Checkins is subscribed to branch lp:mailman/2.1.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription
=== modified file 'Mailman/Handlers/CookHeaders.py'
--- Mailman/Handlers/CookHeaders.py	2015-12-14 22:25:18 +0000
+++ Mailman/Handlers/CookHeaders.py	2016-01-21 22:43:42 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2015 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2016 by the Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -152,8 +152,11 @@
                 realname = email
         # Remove domain from realname if it looks like an email address
         realname = re.sub(r'@([^ .]+\.)+[^ .]+$', '---', realname)
+        # RFC 2047 encode realname if necessary.
+        realname = str(uheader(mlist, realname))
+        lrn = mlist.real_name
         change_header('From',
-                      formataddr(('%s via %s' % (realname, mlist.real_name),
+                      formataddr((_('%(realname)s via %(lrn)s'),
                                  mlist.GetListEmail())),
                       mlist, msg, msgdata)
     else:

=== modified file 'NEWS'
--- NEWS	2016-01-19 20:19:54 +0000
+++ NEWS	2016-01-21 22:43:42 +0000
@@ -36,6 +36,9 @@
 
   Bug fixes and other patches
 
+    - Fixed a bug that could create a garbled From: header with certain DMARC
+      mitigation actions.  (LP: #1536816)
+
     - Treat a poster's address which matches an equivalent_domains address as
       a list member for the regular_exclude_ignore check.  (LP: #1526550)
 

_______________________________________________
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to