Hi!

The courier debian package got a bug report about wrong parsing of the full username field in courier 0.47:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=315636

To reproduce:
- Create a new account
- chfn newusername  and set some fields
- login to sqwebmail and go to "Create Message"

I've investigated that and found out the field was wrongly parsed: Only the commas on the end were removed. The right way is to parse for the first comma and let the string end there. The patch looks like this:

--- success.c.old       2005-06-25 11:00:23.000000000 +0200
+++ success.c   2005-06-25 12:09:08.000000000 +0200
@@ -70,11 +70,12 @@
        }
        strcat(strcpy(authfullname_buf, "AUTHFULLNAME="), authfullname);

-       /* Get rid of GECOS crud */
+       /* Get rid of GECOS crud, we only need the first field */

-       p=authfullname_buf+strlen(authfullname_buf);
-       while (*--p == ',')
-               *p=0;
+       p=authfullname_buf;
+       while (*p != ',' && *p != '\0')
+               p++;
+       *p=0;
        putenv(authaddr_buf);
        putenv(authfullname_buf);
 }

However, in the latest versions of courier and courier-authlib 0.50, it looks like the code has gone completely, and I'm not sure where the code should go.

Can anyone tell me please, where that code should go, please?

Willi


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to