aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2019-06-05 16:39:30 -0700
committerMark Sapiro <mark@msapiro.net>2019-06-05 16:39:30 -0700
commit9c512c07b877fe8c218295c9515c32a2cb4c544a (patch)
tree63b7fa46d28d31d65c9fb96fcccc849e5808ca78
parente924228ee33e529f4a9d63b9bdf88ff0d187c76f (diff)
downloadmailman2-9c512c07b877fe8c218295c9515c32a2cb4c544a.tar.gz
mailman2-9c512c07b877fe8c218295c9515c32a2cb4c544a.tar.xz
mailman2-9c512c07b877fe8c218295c9515c32a2cb4c544a.zip
Fixed missing <> in List-ID with invalid char in description.
-rw-r--r--Mailman/Handlers/CookHeaders.py6
-rw-r--r--NEWS4
2 files changed, 10 insertions, 0 deletions
diff --git a/Mailman/Handlers/CookHeaders.py b/Mailman/Handlers/CookHeaders.py
index e36c5291..41645d6c 100644
--- a/Mailman/Handlers/CookHeaders.py
+++ b/Mailman/Handlers/CookHeaders.py
@@ -328,6 +328,12 @@ def process(mlist, msg, msgdata):
# 2047 encoded.
i18ndesc = uheader(mlist, mlist.description, 'List-Id', maxlinelen=998)
listid_h = formataddr((str(i18ndesc), listid))
+ # With some charsets (utf-8?) and some invalid chars, str(18ndesc) can
+ # be empty.
+ if str(i18ndesc):
+ listid_h = formataddr((str(i18ndesc), listid))
+ else:
+ listid_h = '<%s>' % listid
else:
# without desc we need to ensure the MUST brackets
listid_h = '<%s>' % listid
diff --git a/NEWS b/NEWS
index a16a18df..626851a1 100644
--- a/NEWS
+++ b/NEWS
@@ -43,6 +43,10 @@ Here is a history of user visible changes to Mailman.
- Fixed the spelling of the --no-restart option for mailmanctl.
+ - Fixed an issue where certain combinations of charset and invalid
+ characters in a list's description could produce a List-ID header
+ without angle brackets. (LP: #1831321)
+
2.1.29 (24-Jul-2018)
Bug Fixes