]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1078: ncsa_auth is sensitive on line ending format
authorhno <>
Sun, 26 Sep 2004 03:12:15 +0000 (03:12 +0000)
committerhno <>
Sun, 26 Sep 2004 03:12:15 +0000 (03:12 +0000)
helpers/basic_auth/NCSA/ncsa_auth.c

index 25b71890c77b305f682d42f78fcd01f34fc7d956..d07e52779ae0e5812ebd5104ce9888fa73faf94b 100644 (file)
@@ -89,8 +89,8 @@ read_passwd_file(const char *passwdfile)
        if ((buf[0] == '#') || (buf[0] == ' ') || (buf[0] == '\t') ||
            (buf[0] == '\n'))
            continue;
-       user = strtok(buf, ":\n");
-       passwd = strtok(NULL, ":\n");
+       user = strtok(buf, ":\n\r");
+       passwd = strtok(NULL, ":\n\r");
        if ((strlen(user) > 0) && passwd) {
            u = xmalloc(sizeof(*u));
            u->user = xstrdup(user);