------------------------------------------------------------
revno: 1047
committer: Mark Sapiro <[EMAIL PROTECTED]>
branch nick: 2.1
timestamp: Tue 2008-02-19 20:26:57 -0800
message:
  cmd_confirm.py - Modified to catch a UnicodeError that may occur under
                   obscure circumstances when scanning the message body
                   for "unprocessed" commands.
  
  Moderate.py    - Modified to not try to match "@listname" directly against
                   the sender address.
modified:
  Mailman/Commands/cmd_confirm.py
  Mailman/Handlers/Moderate.py

=== modified file 'Mailman/Commands/cmd_confirm.py'
--- a/Mailman/Commands/cmd_confirm.py   2005-12-30 18:50:08 +0000
+++ b/Mailman/Commands/cmd_confirm.py   2008-02-20 04:26:57 +0000
@@ -90,8 +90,11 @@
             match = 'confirm ' + cookie
             unprocessed = []
             for line in res.commands:
-                if line.lstrip() == match:
-                    continue
+                try:
+                    if line.lstrip() == match:
+                        continue
+                except UnicodeError:
+                    pass
                 unprocessed.append(line)
             res.commands = unprocessed
     # Process just one confirmation string per message

=== modified file 'Mailman/Handlers/Moderate.py'
--- a/Mailman/Handlers/Moderate.py      2008-02-04 20:08:42 +0000
+++ b/Mailman/Handlers/Moderate.py      2008-02-20 04:26:57 +0000
@@ -117,8 +117,9 @@
 
 
 def matches_p(sender, nonmembers):
-    # First strip out all the regular expressions
-    plainaddrs = [addr for addr in nonmembers if not addr.startswith('^')]
+    # First strip out all the regular expressions and listnames
+    plainaddrs = [addr for addr in nonmembers if not (addr.startswith('^')
+                                                 or addr.startswith('@'))]
     addrdict = Utils.List2Dict(plainaddrs, foldcase=1)
     if addrdict.has_key(sender):
         return 1



--
Stable, maintained release series
https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to