From 37bf6ce2b49638516419b1cab86e2d891ade779e Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 4 Dec 2010 17:41:41 -0500 Subject: [PATCH] * url-cookie.el (url-cookie-retrieve): Handle null LOCALPART (Bug#7543). Suggested by Lennart Borgman. --- lisp/url/ChangeLog | 5 +++++ lisp/url/url-cookie.el | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 90533fa297c..8fdd340da6c 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,8 @@ +2010-12-04 Chong Yidong + + * url-cookie.el (url-cookie-retrieve): Handle null LOCALPART. + Suggested by Lennart Borgman (Bug#7543). + 2010-09-18 Glenn Morris * url-cache.el (url-is-cached): Doc fix. diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index 2067f097224..dc7566c6d5e 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el @@ -198,7 +198,7 @@ telling Microsoft that." (and exp (> (float-time) (float-time (date-to-time exp)))))) (defun url-cookie-retrieve (host &optional localpart secure) - "Retrieve all the netscape-style cookies for a specified HOST and LOCALPART." + "Retrieve all cookies for a specified HOST and LOCALPART." (let ((storage (if secure (append url-cookie-secure-storage url-cookie-storage) url-cookie-storage)) @@ -226,7 +226,8 @@ telling Microsoft that." (setq cur (car cookies) cookies (cdr cookies) localpart-match (url-cookie-localpart cur)) - (if (and (if (stringp localpart-match) + (if (and (if (and (stringp localpart-match) + (stringp localpart)) (string-match (concat "^" (regexp-quote localpart-match)) localpart) -- 2.39.2