diff options
author | tkikuchi <> | 2004-09-23 00:42:00 +0000 |
---|---|---|
committer | tkikuchi <> | 2004-09-23 00:42:00 +0000 |
commit | 346d30c28351f46679de084dc5c973709fd419e6 (patch) | |
tree | 93952a194390bdb043bd8558aadcadb644553efe | |
parent | 538544878eac1118f167e789aeeb7c5444780b10 (diff) | |
download | mailman2-346d30c28351f46679de084dc5c973709fd419e6.tar.gz mailman2-346d30c28351f46679de084dc5c973709fd419e6.tar.xz mailman2-346d30c28351f46679de084dc5c973709fd419e6.zip |
[ 873035 ] subject handling in -request mail
more precautions to assert the command should be in 'us-ascii'
and more errors.
Diffstat (limited to '')
-rw-r--r-- | Mailman/Queue/CommandRunner.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Mailman/Queue/CommandRunner.py b/Mailman/Queue/CommandRunner.py index f1f94835..d4d5c5b3 100644 --- a/Mailman/Queue/CommandRunner.py +++ b/Mailman/Queue/CommandRunner.py @@ -75,9 +75,11 @@ class Results: subj = msg.get('subject', '') try: subj = make_header(decode_header(subj)).__unicode__() + # TK: Currently we don't allow 8bit or multibyte in mail command. + subj = subj.encode('us-ascii') # Always process the Subject: header first self.commands.append(subj) - except HeaderParseError: + except (HeaderParseError, UnicodeError, LookupError): # We couldn't parse it so ignore the Subject header pass # Find the first text/plain part |