* Do not log IMAP/POP/SMTP password commands
authorArt Cancro <ajc@citadel.org>
Thu, 9 Jun 2005 03:20:21 +0000 (03:20 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 9 Jun 2005 03:20:21 +0000 (03:20 +0000)
citadel/ChangeLog
citadel/serv_imap.c
citadel/serv_pop3.c
citadel/serv_smtp.c

index 3c075a6498beaf2fdf2d20d15a0eff90808577d6..7d417c34f093506b65a101b5c1b713e28fb2cd46 100644 (file)
@@ -6764,4 +6764,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index 70788cd7cc62eed3b3ee6f6c39641f26c6026fbe..93744f4e6e9c1b8b7a7e8edf1e54efac0febf25a 100644 (file)
@@ -1383,7 +1383,16 @@ void imap_command_loop(void)
                return;
        }
 
-       lprintf(CTDL_INFO, "IMAP: %s\n", cmdbuf);
+       if (IMAP->authstate == imap_as_expecting_password) {
+               lprintf(CTDL_INFO, "IMAP: <password>\n");
+       }
+       else if (bmstrstr(cmdbuf, " LOGIN ", strncasecmp)) {
+               lprintf(CTDL_INFO, "IMAP: LOGIN...\n");
+       }
+       else {
+               lprintf(CTDL_INFO, "IMAP: %s\n", cmdbuf);
+       }
+
        while (strlen(cmdbuf) < 5)
                strcat(cmdbuf, " ");
 
index d83f01f3edb3a20d9949069b1209fb8f9ad15f2f..5fb7328d4b3e1c99e934dd0dabeb0e31f171145a 100644 (file)
@@ -122,7 +122,7 @@ void pop3_user(char *argbuf) {
        strcpy(username, argbuf);
        striplt(username);
 
-       lprintf(CTDL_DEBUG, "Trying <%s>\n", username);
+       /* lprintf(CTDL_DEBUG, "Trying <%s>\n", username); */
        if (CtdlLoginExistingUser(username) == login_ok) {
                cprintf("+OK Password required for %s\r\n", username);
        }
@@ -277,7 +277,7 @@ void pop3_pass(char *argbuf) {
        strcpy(password, argbuf);
        striplt(password);
 
-       lprintf(CTDL_DEBUG, "Trying <%s>\n", password);
+       /* lprintf(CTDL_DEBUG, "Trying <%s>\n", password); */
        if (CtdlTryPassword(password) == pass_ok) {
                pop3_login();
        }
@@ -599,7 +599,12 @@ void pop3_command_loop(void) {
                CC->kill_me = 1;
                return;
        }
-       lprintf(CTDL_INFO, "POP3: %s\r\n", cmdbuf);
+       if (!strncasecmp(cmdbuf, "PASS", 4)) {
+               lprintf(CTDL_INFO, "POP3: PASS...\r\n");
+       }
+       else {
+               lprintf(CTDL_INFO, "POP3: %s\r\n", cmdbuf);
+       }
        while (strlen(cmdbuf) < 5) strcat(cmdbuf, " ");
 
        if (!strncasecmp(cmdbuf, "NOOP", 4)) {
index 770a254c55058743b523e20a2ca5509ffe7d9c60..88fd3e684f43a43f80c0ceb100eb2faeab89df23 100644 (file)
@@ -276,7 +276,7 @@ void smtp_get_user(char *argbuf) {
        char username[SIZ];
 
        CtdlDecodeBase64(username, argbuf, SIZ);
-       lprintf(CTDL_DEBUG, "Trying <%s>\n", username);
+       /* lprintf(CTDL_DEBUG, "Trying <%s>\n", username); */
        if (CtdlLoginExistingUser(username) == login_ok) {
                CtdlEncodeBase64(buf, "Password:", 9);
                cprintf("334 %s\r\n", buf);
@@ -296,7 +296,7 @@ void smtp_get_pass(char *argbuf) {
        char password[SIZ];
 
        CtdlDecodeBase64(password, argbuf, SIZ);
-       lprintf(CTDL_DEBUG, "Trying <%s>\n", password);
+       /* lprintf(CTDL_DEBUG, "Trying <%s>\n", password); */
        if (CtdlTryPassword(password) == pass_ok) {
                smtp_auth_greeting();
        }