[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
LYNX-DEV Lynx 2.7.1 dies when handling cookies.
From: |
Robert Thorncrantz |
Subject: |
LYNX-DEV Lynx 2.7.1 dies when handling cookies. |
Date: |
Sat, 10 May 1997 13:49:35 +0200 (MET DST) |
I've not seen this addressed during the week I've subscribed to Lynx-dev,
but if this is old news, I apologize.
If the server tries to set an "empty cookie", of the form FooCookie=
and the connection is made through https, then Lynx dies with a
segmentation fault.
This is because lynx ignores such cookies, but later tries to mark the
nonexistent cookie as secure. A simple check for cur_cookie != NULL in
LYCookie.c seems to do the trick.
*** LYCookie.c.org Tue Feb 25 15:45:34 1997
--- LYCookie.c Fri May 9 10:42:22 1997
***************
*** 850,866 ****
* Store the final cookie if within length limit. - FM
*/
if (length <= 4096) {
! /*
! * Force the secure flag on if it's not
! * set but this is an https URL. - FM
! */
! if (!strncasecomp(address, "https:", 6) &&
! !(cur_cookie->flags & COOKIE_FLAG_SECURE)) {
! cur_cookie->flags |= COOKIE_FLAG_SECURE;
! if (TRACE)
! fprintf(stderr, "LYSetCookie: Forced the 'secure' flag on.\n");
! }
! store_cookie(cur_cookie, hostname, path);
} else {
if (TRACE)
fprintf(stderr, "LYSetCookie: Rejecting cookie due to length!\n");
--- 850,868 ----
* Store the final cookie if within length limit. - FM
*/
if (length <= 4096) {
! if(cur_cookie!=NULL) {
! /*
! * Force the secure flag on if it's not
! * set but this is an https URL. - FM
! */
! if (!strncasecomp(address, "https:", 6) &&
! !(cur_cookie->flags & COOKIE_FLAG_SECURE)) {
! cur_cookie->flags |= COOKIE_FLAG_SECURE;
! if (TRACE)
! fprintf(stderr, "LYSetCookie: Forced the 'secure' flag
on.\n");
! }
! store_cookie(cur_cookie, hostname, path);
! }
} else {
if (TRACE)
fprintf(stderr, "LYSetCookie: Rejecting cookie due to length!\n");
;
; To UNSUBSCRIBE: Send a mail message to address@hidden
; with "unsubscribe lynx-dev" (without the
; quotation marks) on a line by itself.
;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- LYNX-DEV Lynx 2.7.1 dies when handling cookies.,
Robert Thorncrantz <=