diff options
| author | klm | 1998-12-07 17:43:22 +0000 |
|---|---|---|
| committer | klm | 1998-12-07 17:43:22 +0000 |
| commit | 1bb5c5ab613817916e930520bb4b06e8b0a36b51 (patch) | |
| tree | f6ac73fa16bd8bbcc437e9249a5f1a85f39a7b87 | |
| parent | fd2b46fd552f03a8e564eaa9655d18ea9e9173c0 (diff) | |
| download | mailman-1bb5c5ab613817916e930520bb4b06e8b0a36b51.tar.gz mailman-1bb5c5ab613817916e930520bb4b06e8b0a36b51.tar.zst mailman-1bb5c5ab613817916e930520bb4b06e8b0a36b51.zip | |
.ProcessConfirmCmd(): For invalid confirmation numbers, indicate that
confirmations expire after the set number of days.
| -rw-r--r-- | Mailman/MailCommandHandler.py | 13 |
1 files changed, 11 insertions, 2 deletions
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") |
