From f17ee4947a4e25cc4e94b96b1142764e0c856d2d Mon Sep 17 00:00:00 2001 From: bwarsaw <> Date: Sat, 3 Jan 2004 01:13:26 +0000 Subject: __checkone(): Patch 869644, ignore NotAMemberError that can get raised from AuthContextInfo() when old cookie data is for someone no longer a member of the mailing list. Closes SF bug # 869647. Bug and patch by Stephan Berndts. --- Mailman/SecurityManager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Mailman/SecurityManager.py b/Mailman/SecurityManager.py index 62360feb..4ebb1fcd 100644 --- a/Mailman/SecurityManager.py +++ b/Mailman/SecurityManager.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2003 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2004 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 @@ -307,7 +307,10 @@ class SecurityManager: def __checkone(self, c, authcontext, user): # Do the guts of the cookie check, for one authcontext/user # combination. - key, secret = self.AuthContextInfo(authcontext, user) + try: + key, secret = self.AuthContextInfo(authcontext, user) + except Errors.NotAMemberError: + return False if not c.has_key(key) or not isinstance(secret, StringType): return False # Undo the encoding we performed in MakeCookie() above. BAW: I -- cgit v1.2.3