[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d3517de 2/2: Make url-cookie.el be more resistant against bogus d
From: |
Lars Ingebrigtsen |
Subject: |
master d3517de 2/2: Make url-cookie.el be more resistant against bogus data |
Date: |
Tue, 29 Oct 2019 17:53:13 -0400 (EDT) |
branch: master
commit d3517de4b472ede7abaf3a552c5064be979e6eff
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Make url-cookie.el be more resistant against bogus data
* lisp/url/url-cookie.el (url-cookie-handle-set-cookie): Don't bug
out on large max-age values (bug#37974).
---
lisp/url/url-cookie.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el
index 31fc3e7..740a43f 100644
--- a/lisp/url/url-cookie.el
+++ b/lisp/url/url-cookie.el
@@ -304,9 +304,10 @@ i.e. 1970-1-1) are loaded as expiring one year from now
instead."
(url-filename url-current-object))))
(expires nil))
(if (and max-age (string-match "\\`-?[0-9]+\\'" max-age))
- (setq expires (format-time-string "%a %b %d %H:%M:%S %Y GMT"
- (time-add nil (read max-age))
- t))
+ (setq expires (ignore-errors
+ (format-time-string "%a %b %d %H:%M:%S %Y GMT"
+ (time-add nil (read max-age))
+ t)))
(setq expires (cdr-safe (assoc-string "expires" args t))))
(while (consp trusted)
(if (string-match (car trusted) current-url)