Subject: Bug fix

From: "Daniel Sands" <[email-masked]>
Date: Thu, 20 Jul 2000 12:17:54 -0600

I discovered a bug in imap4r1.c.  Under some circumstances, imap_open won't
generate a valid stream mailbox name.  Specifically, if the login process
doesn't use anonymous login or generate a user name.  This is possible for
some add-on authenticator to do.

The end result is that no } is written to the end of the host name, so you
might see a stream name such as:

{mymail.here.com/imapINBOX

The fix is to add a completion as an else case:
    if (stream->anonymous) strcat (tmp,"/anonymous}");
    else {                      /* record user name */
      if (!LOCAL->user && usr[0]) LOCAL->user = cpystr (usr);
      if (LOCAL->user) sprintf (tmp + strlen (tmp),"/user=\"%s\"}",
                                LOCAL->user);
        else strcat(tmp, "}");  <---- Add this line
    }

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------