diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2014-08-03 08:38:52 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2014-08-03 08:38:52 -0700 |
commit | 308cc448e5d6ffd44c7ff366a99d34bbfb0e8c4d (patch) | |
tree | 04e83c1f35b94135a52711a5934e752fffea5c3d /lisp/url/url-cookie.el | |
parent | 8f88f7d3c5da38cd2d781770b533dc6c93c52d59 (diff) | |
download | emacs-308cc448e5d6ffd44c7ff366a99d34bbfb0e8c4d.tar.gz |
Don't mishandle year-9999 dates.
* lisp/calendar/parse-time.el (parse-time-rules):
Allow years up to most-positive-fixnum.
* lisp/calendar/time-date.el (date-to-time):
Pass "Specified time is not representable" errors through.
* lisp/url/url-cookie.el (url-cookie-expired-p): Treat out-of-range
expiration dates as if they were far in the future.
* src/editfns.c (decode_time_components): Store an invalid timespec
on overflow, instead of returning false, so that the caller can
distinguish overflow from other errors.
(lisp_time_argument, lisp_seconds_argument): If the time is out
of range, signal a time overflow instead of an invalid time spec.
* src/keyboard.c (decode_timer): Treat time overflow like other
timespec errors.
Fixes: debbugs:18176
Diffstat (limited to 'lisp/url/url-cookie.el')
-rw-r--r-- | lisp/url/url-cookie.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index 55e0fb33951..f89886b95dd 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el @@ -158,7 +158,9 @@ telling Microsoft that." "Return non-nil if COOKIE is expired." (let ((exp (url-cookie-expires cookie))) (and (> (length exp) 0) - (> (float-time) (float-time (date-to-time exp)))))) + (condition-case () + (> (float-time) (float-time (date-to-time exp))) + (error nil))))) (defun url-cookie-retrieve (host &optional localpart secure) "Retrieve all cookies for a specified HOST and LOCALPART." |