summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2002-07-09 19:29:13 +0000
committerbwarsaw2002-07-09 19:29:13 +0000
commit7ec39d0596092de34954f856c1e4cfdbe25bf2cc (patch)
tree6643e2d6643a5587cf7ce82714564bffbd04c630
parent39703cb2f146020f906c5ffed110b886ba9efed8 (diff)
downloadmailman-7ec39d0596092de34954f856c1e4cfdbe25bf2cc.tar.gz
mailman-7ec39d0596092de34954f856c1e4cfdbe25bf2cc.tar.zst
mailman-7ec39d0596092de34954f856c1e4cfdbe25bf2cc.zip
process(): Fix for confusing "you were subscribed and your
confirmation string was invalid" messages. The problem was if the responder left the confirmation string in the Subject: and also copied it to the body, the second processing of the confirmation would find no cookie. So now we always stop after processing the first confirmation command (yes, that means no other commands in the message will be processed, which is fine). We also trim the unprocessed commands in the results to not include identical confirmation strings -- otherwise they'll see their confirmation as unprocessed.
-rw-r--r--Mailman/Commands/cmd_confirm.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/Mailman/Commands/cmd_confirm.py b/Mailman/Commands/cmd_confirm.py
index 83992cf05..c2f147f9e 100644
--- a/Mailman/Commands/cmd_confirm.py
+++ b/Mailman/Commands/cmd_confirm.py
@@ -50,7 +50,6 @@ Invalid confirmation string. Note that confirmation strings expire
approximately %(days)s days after the initial subscription request. If your
confirmation has expired, please try to re-submit your original request or
message."""))
- return STOP
except Errors.MMNeedApproval:
res.results.append(_("""\
Your request has been forwarded to the list moderator for approval."""))
@@ -58,12 +57,21 @@ Your request has been forwarded to the list moderator for approval."""))
# Some other subscription request for this address has
# already succeeded.
res.results.append(_('You are already subscribed.'))
- return STOP
except Errors.NotAMemberError:
# They've already been unsubscribed
res.results.append(_("""\
You are not current a member. Have you already unsubscribed or changed
your email address?"""))
- return STOP
else:
res.results.append(_('Confirmation succeeded'))
+ # Consume any other confirmation strings with the same cookie so the
+ # user doesn't get a misleading "unprocessed" message.
+ match = 'confirm ' + cookie
+ unprocessed = []
+ for line in res.commands:
+ if line.lstrip() == match:
+ continue
+ unprocessed.append(line)
+ res.commands = unprocessed
+ # Process just one confirmation string per message
+ return STOP