From 346d30c28351f46679de084dc5c973709fd419e6 Mon Sep 17 00:00:00 2001 From: tkikuchi <> Date: Thu, 23 Sep 2004 00:42:00 +0000 Subject: [ 873035 ] subject handling in -request mail more precautions to assert the command should be in 'us-ascii' and more errors. --- Mailman/Queue/CommandRunner.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3