diff options
author | Mark Sapiro <mark@msapiro.net> | 2015-03-01 08:35:02 -0800 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2015-03-01 08:35:02 -0800 |
commit | a542b45f13b6da18a63927f3324faa6b3ffefe71 (patch) | |
tree | edc396353c5f164ff24e6ddcb68c7d62f3df7c43 /Mailman/Queue/CommandRunner.py | |
parent | 22fb785f196e2bcf667193e64bf5e5af5351eada (diff) | |
download | mailman2-a542b45f13b6da18a63927f3324faa6b3ffefe71.tar.gz mailman2-a542b45f13b6da18a63927f3324faa6b3ffefe71.tar.xz mailman2-a542b45f13b6da18a63927f3324faa6b3ffefe71.zip |
Fixed a bug in CommandRunner that could process the second word of a
body line as a command word and a case sensitivity in commands in
Subject: with an Re: prefix.
Diffstat (limited to 'Mailman/Queue/CommandRunner.py')
-rw-r--r-- | Mailman/Queue/CommandRunner.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Mailman/Queue/CommandRunner.py b/Mailman/Queue/CommandRunner.py index 6fbcac2a..c5cc3d94 100644 --- a/Mailman/Queue/CommandRunner.py +++ b/Mailman/Queue/CommandRunner.py @@ -146,18 +146,21 @@ class Results: # # If that still didn't work it isn't enough to stop processing. # BAW: should we include a message that the Subject: was ignored? + # + # But first, be sure we're looking at the Subject: and not past + # it already. + if self.lineno != 0: + return BADCMD if self.subjcmdretried < 1: self.subjcmdretried += 1 if re.search('^.*:.+', cmd): - return self.do_command(re.sub('.*:', '', cmd), args) + cmd = re.sub('.*:', '', cmd).lower() + return self.do_command(cmd, args) if self.subjcmdretried < 2 and args: self.subjcmdretried += 1 - cmd = args.pop(0) + cmd = args.pop(0).lower() return self.do_command(cmd, args) - if self.lineno <> 0: - return BADCMD - else: - return BADSUBJ + return BADSUBJ if handler.process(self, args): return STOP else: |