summaryrefslogtreecommitdiff
path: root/Mailman/MailCommandHandler.py
diff options
context:
space:
mode:
authorklm1998-12-07 17:43:22 +0000
committerklm1998-12-07 17:43:22 +0000
commit1bb5c5ab613817916e930520bb4b06e8b0a36b51 (patch)
treef6ac73fa16bd8bbcc437e9249a5f1a85f39a7b87 /Mailman/MailCommandHandler.py
parentfd2b46fd552f03a8e564eaa9655d18ea9e9173c0 (diff)
downloadmailman-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.
Diffstat (limited to 'Mailman/MailCommandHandler.py')
-rw-r--r--Mailman/MailCommandHandler.py13
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")