------------------------------------------------------------
revno: 1155
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Sat 2009-01-10 12:44:55 -0800
message:
  - Fixed the admin Membership List Find member function so the 'letter'
    links to a chunked result would still be limited to the Find member
    search. SF patch #1532081.
  
  - Changed scripts/driver to return a 405 status for non GET, POST, HEAD
    methods. SF patch #1578756.
modified:
  Mailman/Cgi/admin.py
  NEWS
  scripts/driver

=== modified file 'Mailman/Cgi/admin.py'
--- a/Mailman/Cgi/admin.py      2008-11-13 04:02:29 +0000
+++ b/Mailman/Cgi/admin.py      2009-01-10 20:44:55 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2008 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2009 by the Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -940,7 +940,10 @@
     if bucket:
         cells = []
         for letter in keys:
-            url = adminurl + '/members?letter=%s' % letter
+            findfrag = ''
+            if regexp:
+                findfrag = '&findmember=' + urllib.quote(regexp)
+            url = adminurl + '/members?letter=' + letter + findfrag
             if letter == bucket:
                 show = Bold('[%s]' % letter.upper()).Format()
             else:

=== modified file 'NEWS'
--- a/NEWS      2009-01-03 02:40:28 +0000
+++ b/NEWS      2009-01-10 20:44:55 +0000
@@ -75,6 +75,13 @@
       the summary page, the reject reason is the rejection message from the
       Errors.HoldMessage subclass instead of the generic "No reason given".
 
+    - Fixed the admin Membership List Find member function so the 'letter'
+      links to a chunked result would still be limited to the Find member
+      search. SF patch #1532081.
+
+    - Changed scripts/driver to return a 405 status for non GET, POST, HEAD
+      methods. SF patch #1578756.
+
 2.1.11 (30-Jun-2008)
 
   New Features

=== modified file 'scripts/driver'
--- a/scripts/driver    2005-08-27 01:40:17 +0000
+++ b/scripts/driver    2009-01-10 20:44:55 +0000
@@ -1,6 +1,6 @@
 # -*- python -*-
 
-# Copyright (C) 1998-2004 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2009 by the Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -14,10 +14,12 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
 
 # This better succeed.  If this fails, Python is royally screwed so we might
 # as well let the Web server give us a fatal and obtrusive error.
+import os
 import sys
 
 # From here on we are as bulletproof as possible!
@@ -51,9 +53,10 @@
 #   no way to catch that.  Mailman's install procedure should make this highly
 #   unlikely.
 #
-# - The sys module could be royally screwed, probably we couldn't import it.
-#   This would indicate a serious problem with the Python installation, so
-#   it's also highly unlikely to occur.
+# - The os or sys modules could be royally screwed, probably we couldn't
+#   import one or both of them.  This would indicate a serious problem with
+#   the Python installation, so it's also highly unlikely to occur.
+
 
 
 def run_main():
@@ -98,7 +101,15 @@
             try:
                 sys.stderr = logger
                 sys.stdout = tempstdout
-                main()
+                # Check for a valid request method.
+                request_method = os.environ.get('REQUEST_METHOD')
+                if not request_method.lower() in ['get', 'post', 'head']:
+                    print 'Status: 405 Method not allowed'
+                    print 'Content-type: text/plain'
+                    print
+                    print '%s method is not allowed' % request_method
+                else:
+                    main()
                 sys.__stdout__.write(tempstdout.getvalue())
             finally:
                 sys.stderr = sys.__stderr__



--
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