From 1140c79699230ab1e5f8d58bba60eec426bc2673 Mon Sep 17 00:00:00 2001 From: Thomas Lotterer Date: Fri, 19 Mar 2004 15:39:21 +0000 Subject: [PATCH] split cookies on (un)subscription, too - found and fixed by tho --- subscribe.c | 11 ++++++++--- unsubscribe.c | 13 +++++++++---- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/subscribe.c b/subscribe.c index ae5c2bd..909d8a7 100644 --- a/subscribe.c +++ b/subscribe.c @@ -215,6 +215,7 @@ AddAddress(struct Mail * MailStruct, /* Require approval. */ char* command; + char c; char* cookie; syslog(LOG_INFO, "%s: Attempt to subscribe \"%s\" to list \"%s\" deferred, because the " \ @@ -240,16 +241,20 @@ AddAddress(struct Mail * MailStruct, if (strcasecmp(address, originator) == 0) buffer = text_easy_sprintf("You requested that the address \"%s\" should be subscribed to " \ "the mailing list \"%s\". This will not happen unless you approve the " \ - "request by replying to this mail and citing the string", + "request by replying to this mail and concatenating the following two strings into one", address, listname); else buffer = text_easy_sprintf("Per request from \"%s\", the address \"%s\" should be subscribed to " \ "the mailing list \"%s\". This will not happen unless you approve the " \ - "request by replying to this mail and citing the string", + "request by replying to this mail and concatenating the following two strings into one", originator, address, listname); text_wordwrap(buffer, 70); fprintf(fh, "%s\n", buffer); - fprintf(fh, "\n %s\n\n", cookie); + fprintf(fh, "\n"); + c = cookie[16]; + cookie[16] = '\0'; fprintf(fh, " %s\n", &cookie[ 0]); + cookie[16] = c; fprintf(fh, " %s\n", &cookie[16]); + fprintf(fh, "\n"); fprintf(fh, "in your reply.\n"); CloseMailer(fh); diff --git a/unsubscribe.c b/unsubscribe.c index dd278f7..cda8d0d 100644 --- a/unsubscribe.c +++ b/unsubscribe.c @@ -218,6 +218,7 @@ DeleteAddress(struct Mail * MailStruct, /* Require approval. */ char* command; + char c; char* cookie; syslog(LOG_INFO, "%s: Attempt to unsubscribe \"%s\" from list \"%s\" deferred, because the " \ @@ -243,16 +244,20 @@ DeleteAddress(struct Mail * MailStruct, if (strcasecmp(address, originator) == 0) buffer = text_easy_sprintf("You requested that the address \"%s\" should be unsubscribed from " \ "the mailing list \"%s\". This will not happen unless you approve the " \ - "request by replying to this mail and citing the string", + "request by replying to this mail and concatenating the following two strings into one", originator, address, listname); else buffer = text_easy_sprintf("Per request from \"%s\", the address \"%s\" should be unsubscribed from " \ "the mailing list \"%s\". This will not happen unless you approve the " \ - "request by replying to this mail and citing the string", + "request by replying to this mail and concatenating the following two strings into one", originator, address, listname); text_wordwrap(buffer, 70); - fprintf(fh, "%s\n", buffer); - fprintf(fh, "\n %s\n\n", cookie); + fprintf(fh, "%s\n", buffer); + fprintf(fh, "\n"); + c = cookie[16]; + cookie[16] = '\0'; fprintf(fh, " %s\n", &cookie[ 0]); + cookie[16] = c; fprintf(fh, " %s\n", &cookie[16]); + fprintf(fh, "\n"); fprintf(fh, "in your reply.\n"); CloseMailer(fh); }