From 1bb5c5ab613817916e930520bb4b06e8b0a36b51 Mon Sep 17 00:00:00 2001 From: klm Date: Mon, 7 Dec 1998 17:43:22 +0000 Subject: .ProcessConfirmCmd(): For invalid confirmation numbers, indicate that confirmations expire after the set number of days. --- Mailman/MailCommandHandler.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'Mailman/MailCommandHandler.py') diff --git a/Mailman/MailCommandHandler.py b/Mailman/MailCommandHandler.py index 7a7d828b1..048bcbb53 100644 --- a/Mailman/MailCommandHandler.py +++ b/Mailman/MailCommandHandler.py @@ -506,9 +506,18 @@ class MailCommandHandler: try: self.ProcessConfirmation(cookie) except Errors.MMBadConfirmation: + from math import floor + # Express in days, rounded to three places: + expiredays = floor((mm_cfg.PENDING_REQUEST_LIFE / (60 * 60 * 24.0)) + * 1000) / 1000 + if floor(expiredays) == expiredays: + expiredays = int(expiredays) self.AddError("Invalid confirmation number!\n" - "Please recheck the confirmation number and" - " try again.") + "Note that confirmation numbers expire %s days" + " after initial request." + "\nPlease check date and number and try again," + " from the start if necessary." + % expiredays) except Errors.MMNeedApproval, admin_addr: self.AddToResponse("your request has been forwarded to the list " "administrator for approval") -- cgit v1.2.3-70-g09d2