Commit 14e1d9ea authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen
Browse files

(url-cookie-expired-p): Protect against zero-length cookie expiry dates.

parent 07a79ce4
2011-11-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* url-cookie.el (url-cookie-expired-p): Protect against
zero-length cookie expiry dates.
2011-10-19 Chong Yidong <cyd@gnu.org>
* url-handlers.el (url-handler-mode): Doc fix.
......
......@@ -156,7 +156,8 @@ telling Microsoft that."
(defun url-cookie-expired-p (cookie)
"Return non-nil if COOKIE is expired."
(let ((exp (url-cookie-expires cookie)))
(and exp (> (float-time) (float-time (date-to-time exp))))))
(and (> (length exp) 0)
(> (float-time) (float-time (date-to-time exp))))))
(defun url-cookie-retrieve (host &optional localpart secure)
"Retrieve all cookies for a specified HOST and LOCALPART."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment