From 224e9cc7a1a084568e136f7b959c32e177ce7ef8 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 13 Jan 2022 18:38:34 -0500 Subject: [PATCH] Removed some debugs that are no longer needed now that the listsub rework is complete. Also updated the netconfig specification to remove the obsolete pending command. --- citadel/docs/netconfigs.txt | 21 --------------------- citadel/modules/listsub/serv_listsub.c | 11 ++++------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/citadel/docs/netconfigs.txt b/citadel/docs/netconfigs.txt index 113871d48..06d814558 100644 --- a/citadel/docs/netconfigs.txt +++ b/citadel/docs/netconfigs.txt @@ -35,27 +35,6 @@ As of 2021, this is now an alias for listrecp and may be converted to listrecp by the mailing list manager. -INSTRUCTION: subpending -SYNTAX: subpending|friko@mumjiboolean.com|listrecp|A234Z|1234567890|http://foo.com/lists -"Subscription pending" for the specified address. This means that -someone has requested to subscribe an e-mail address (in this case, -friko@mumjiboolean.com) to the list. The third parameter is either "list" -or "digest" to specify a normal subscription or a digest subscription. -The fourth parameter is an authentication token which is generated by the server -and e-mailed to the specified address. When the user comes back and supplies -this token, the subscription is complete. The fifth parameter is a simple -timestamp, so that we may purge old records which were never confirmed. - -The sixth field is the URL of the web page used to enter the subscription -request, minus any parameters. - - -INSTRUCTION: unsubpending -SYNTAX: unsubpending|friko@mumjiboolean.com|A234Z|1234567890|http://foo.com/lists -Similar to the 'subpending' command, except this one is for unsubscribe -requests. The same rules apply with regard to the token and the web page. - - INSTRUCTION: participate SYNTAX: participate|list-addr@example.com This allows a room to be a *subscriber* to an external mailing list diff --git a/citadel/modules/listsub/serv_listsub.c b/citadel/modules/listsub/serv_listsub.c index 0c8335a50..7d7e93693 100644 --- a/citadel/modules/listsub/serv_listsub.c +++ b/citadel/modules/listsub/serv_listsub.c @@ -192,8 +192,8 @@ void do_confirm(int cmd, char *roomname, char *emailaddr, char *url, char *gener int config_lines = 0; char *oldnetconfig, *newnetconfig; - // The server has generated a persistent confirmation token for the user+room combination. - // Let's see if the user has supplied the same token. + // During opt #1, the server generated a persistent confirmation token for the user+room combination. + // Let's see if the user has supplied the same token during opt #2. if (strcmp(generated_token, supplied_token)) { cprintf("%d This request could not be authenticated.\n", ERROR + PASSWORD_REQUIRED); return; @@ -254,10 +254,6 @@ void cmd_lsub(char *cmdbuf) { extract_token(url, cmdbuf, 3, '|', sizeof url); // token 3 is the URL at which we subscribed extract_token(supplied_token, cmdbuf, 4, '|', sizeof supplied_token); // token 4 is the token supplied by the caller - syslog(LOG_DEBUG, "cmd_lsub(cmd=%s, roomname=%s, emailaddr=%s, url=%s, token=%s", - cmd, roomname, emailaddr, url, supplied_token - ); - // First confirm that the caller is referencing a room that actually exists. if (CtdlGetRoom(&CC->room, roomname) != 0) { cprintf("%d There is no list called '%s'\n", ERROR + ROOM_NOT_FOUND, roomname); @@ -269,9 +265,10 @@ void cmd_lsub(char *cmdbuf) { return; } - // Room confirmed, now parse the command. + // Generate a confirmation token -- either to supply to the user for opt #1 or to compare for opt #2 generate_confirmation_token(generated_token, sizeof generated_token, roomname, emailaddr); + // Now parse the command. if (!strcasecmp(cmd, "subscribe")) { send_subscribe_confirmation_email(roomname, emailaddr, url, generated_token); } -- 2.30.2