[links-list] Cookie handling bug.
lenbok at mailandnews.com
Wed Sep 5 22:46:16 PDT 2001
Group reply please.
When using links with bugzilla (http://bugzilla.mozilla.org/ and our
local installation of bugzilla), it seems I have to log in for every
operation because the bugzilla cookies aren't being parsed correctly.
After a bit of investigation, it seems the cookie parsing code in links
is overly strict. The problem is that the bugzilla cookies contained a
space after the first cookie value and before the first ;.
I fixed this in my version of links (0.96) by changing the first for
loop in set_cookie from:
for (p = str; *p != ';' && *p; p++) if (WHITECHAR(*p)) return 0;
for (p = str; *p != ';' && *p && !(WHITECHAR(*p)); p++);
I suspect the cookie parsing code may need to be refined some more,
because my hurried look at the rfc2109 indicates that it's even
permitted to have spaces on either side of the equals (whereas in this
case the space was between the value and the ; character. (It's been
*ages* since I've programmed in C, otherwise I'd do a full patch).
Unsubscribe: send email to links-list-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message
More information about the links-list