fetchmail-friends
[Top] [All Lists]

[fetchmail]imap password

2002-05-26 23:56:32
imap password is not (correctly) shrouded in verbose mode if it
contains \ or ".

This patch should fix that:

===========================================================
diff -Naru fetchmail-5.9.11.orig/fetchmail.h fetchmail-5.9.11/fetchmail.h
--- fetchmail-5.9.11.orig/fetchmail.h   Mon May 27 12:02:12 2002
+++ fetchmail-5.9.11/fetchmail.h        Mon May 27 12:06:16 2002
@@ -384,7 +384,7 @@
 extern flag configdump;                /* dump control blocks as Python 
dictionary */
 extern char *fetchmailhost;    /* either "localhost" or an FQDN */
 extern int suppress_tags;      /* suppress tags in tagged protocols? */
-extern char shroud[PASSWORDLEN];       /* string to shroud in debug output */
+extern char shroud[PASSWORDLEN*2+1];   /* string to shroud in debug output */
 #ifdef SDPS_ENABLE
 extern char *sdps_envfrom;
 extern char *sdps_envto;
diff -Naru fetchmail-5.9.11.orig/imap.c fetchmail-5.9.11/imap.c
--- fetchmail-5.9.11.orig/imap.c        Mon Apr  1 13:25:20 2002
+++ fetchmail-5.9.11/imap.c     Mon May 27 12:06:16 2002
@@ -425,7 +425,7 @@
        imap_canonicalize(remotename, ctl->remotename, NAMELEN);
        imap_canonicalize(password, ctl->password, PASSWORDLEN);
 
-       strcpy(shroud, ctl->password);
+       strcpy(shroud, password);
        ok = gen_transact(sock, "LOGIN \"%s\" \"%s\"", remotename, password);
        shroud[0] = '\0';
        if (ok)
diff -Naru fetchmail-5.9.11.orig/transact.c fetchmail-5.9.11/transact.c
--- fetchmail-5.9.11.orig/transact.c    Sat Mar  9 19:10:44 2002
+++ fetchmail-5.9.11/transact.c Mon May 27 12:07:04 2002
@@ -40,7 +40,7 @@
 
 int mytimeout;         /* value of nonreponse timeout */
 int suppress_tags;     /* emit tags? */
-char shroud[PASSWORDLEN];      /* string to shroud in debug output */
+char shroud[PASSWORDLEN*2+1];  /* string to shroud in debug output */
 struct msgblk msgblk;
 
 char tag[TAGLEN];
===========================================================

Sunil Shetye.


<Prev in Thread] Current Thread [Next in Thread>
  • [fetchmail]imap password, Sunil Shetye <=