From: Chong Yidong Date: Sat, 4 Dec 2010 22:41:41 +0000 (-0500) Subject: * url-cookie.el (url-cookie-retrieve): Handle null LOCALPART (Bug#7543). X-Git-Tag: emacs-pretest-23.2.91~31 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=37bf6ce2b49638516419b1cab86e2d891ade779e;p=emacs.git * url-cookie.el (url-cookie-retrieve): Handle null LOCALPART (Bug#7543). Suggested by Lennart Borgman. --- 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)