bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-mailutils] syntax for movemail (mailutils), apop, rmail


From: Sergey Poznyakoff
Subject: Re: [bug-mailutils] syntax for movemail (mailutils), apop, rmail
Date: Tue, 14 Oct 2008 16:44:39 +0300

Hi Alfred,

>   pop://<USER>:<PASSWORD>;auth=+APOP@<HOST>
> 
> is interpreted as having the user <USER>:<PASSWORD>.

Thanks for noticing.  Please, try the attached patch.

Regards,
Sergey

Index: mailbox/url.c
===================================================================
RCS file: /cvsroot/mailutils/mailutils/mailbox/url.c,v
retrieving revision 1.32
diff -p -u -r1.32 url.c
--- mailbox/url.c       16 Aug 2008 08:21:32 -0000      1.32
+++ mailbox/url.c       14 Oct 2008 13:42:37 -0000
@@ -260,12 +260,17 @@ url_parse0 (mu_url_t u, char *name)
              /* Try to split the user into a:
                 <user>:<password>
                 or
-                <user>;AUTH=<auth>
+                <user>:<password>;AUTH=<auth>
              */
 
              for (; *name; name++)
                {
-                 if (*name == ';')
+                 if (*name == ':')
+                   {
+                     *name++ = 0;
+                     u->passwd = name;
+                   }
+                 else if (*name == ';')
                    {
                      /* Make sure it's the auth token. */
                      if (strncasecmp (name + 1, "auth=", 5) == 0)
@@ -276,12 +281,6 @@ url_parse0 (mu_url_t u, char *name)
                          break;
                        }
                    }
-                 if (*name == ':')
-                   {
-                     *name++ = 0;
-                     u->passwd = name;
-                     break;
-                   }
                }
            }
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]