diff options
| author | klm | 1998-07-13 15:12:51 +0000 |
|---|---|---|
| committer | klm | 1998-07-13 15:12:51 +0000 |
| commit | 61d9c70895a7f4425b4b906c8d269335f694c306 (patch) | |
| tree | 8934c2d1f291e5e5d8085709ad370810aab2ccbf /Mailman/MailCommandHandler.py | |
| parent | 665e4d0b7d8400c017798f1a4433425e691aeb47 (diff) | |
| download | mailman-61d9c70895a7f4425b4b906c8d269335f694c306.tar.gz mailman-61d9c70895a7f4425b4b906c8d269335f694c306.tar.zst mailman-61d9c70895a7f4425b4b906c8d269335f694c306.zip | |
.ParseMailCommands(): Escape the list real_name that's interpolated
into the confimation-expression pattern, to prevent regex-significant
characters in maillist names from tripping-up the regex compiler.
This really can happen - in fact, it does when people try to subscribe
to the "c++-sig"!
(I've cursorily checked through the python stuff in scripts, Mailman,
and Mailman/Cgi for other interpolations that might trip re.compile,
but didn't find any other instances. Be on the lookout, though, this
is a tricky one...)
(This was present in 1.0b4, as well, and i believe it accounts for two
elusive, outstanding problems:
- the "pcre.error : ('nothing to repeat', 2)" traceback, which i
mentioned on my recent "problems" list, and
- reports i've gotten (one this morning, coincidentally) of failures
in subscribing to c++-sig.)
I'm going to deliver a patch for 1.0b4 to the newsgroup, once i track
down a few other problems.)
Diffstat (limited to 'Mailman/MailCommandHandler.py')
| -rw-r--r-- | Mailman/MailCommandHandler.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Mailman/MailCommandHandler.py b/Mailman/MailCommandHandler.py index a21866954..7db8daded 100644 --- a/Mailman/MailCommandHandler.py +++ b/Mailman/MailCommandHandler.py @@ -111,11 +111,11 @@ class MailCommandHandler: # conf_pat = (r"%s -- confirmation of subscription" r" -- request (\d\d\d\d\d\d)" - % self.real_name) + % re.escape(self.real_name)) match = re.search(conf_pat, subject) if not match: match = re.search(conf_pat, mail.body) - if match: + else: lines = ["confirm %s" % (match.group(1))] else: self.AddError("Subject line ignored: %s" % subject) |
