From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#37974: eww produces "error in process filter: Specified time is not representable" Date: Tue, 29 Oct 2019 22:52:02 +0100 Message-ID: <871ruvz0cd.fsf@gnus.org> References: <20191029003245.GA10341@arch-chirva.localdomain> <20191029045102.GA5852@D-69-91-141-110.dhcp4.washington.edu> <20191029102522.GA26999@D-69-91-141-110.dhcp4.washington.edu> <1FB46AE7-5E98-443D-950D-212F81FF5E77@gmail.com> <87wocnzpkp.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="58654"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 37974@debbugs.gnu.org To: "A.C." Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 29 22:53:36 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iPZQm-000FA1-2Y for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Oct 2019 22:53:36 +0100 Original-Received: from localhost ([::1]:34204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPZQk-0005Kl-ED for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Oct 2019 17:53:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50586) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPZQF-0005FL-E9 for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2019 17:53:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPZQE-0002oO-0h for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2019 17:53:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39882) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iPZQD-0002oB-TC for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2019 17:53:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iPZQD-0005f2-Nk for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2019 17:53:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Oct 2019 21:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37974 X-GNU-PR-Package: emacs Original-Received: via spool by 37974-submit@debbugs.gnu.org id=B37974.157238592821675 (code B ref 37974); Tue, 29 Oct 2019 21:53:01 +0000 Original-Received: (at 37974) by debbugs.gnu.org; 29 Oct 2019 21:52:08 +0000 Original-Received: from localhost ([127.0.0.1]:48700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPZPM-0005dX-Bp for submit@debbugs.gnu.org; Tue, 29 Oct 2019 17:52:08 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:45008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPZPK-0005dL-MH for 37974@debbugs.gnu.org; Tue, 29 Oct 2019 17:52:07 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iPZPG-0001sW-KY; Tue, 29 Oct 2019 22:52:05 +0100 In-Reply-To: (A. C.'s message of "Tue, 29 Oct 2019 10:06:28 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:170381 Archived-At: "A.C." writes: >>In any case, Emacs 27 has bignum support, so this should hopefully not >>be a problem any more. Can you try the test case with the current >>Emacs >>trunk and see whether it's still present? > > That will be tough. This 32-bit machine overheats something fierce; I > doubt I can even clone the git repo without it dying, let alone > compile. Testing a bit more, the bug is present even on 64-bits systems. While this works: (format-time-string "%a %b %d %H:%M:%S %Y GMT" 9460800000000000 t) => "Wed Apr 08 00:00:00 299802787 GMT" (format-time-string "%a %b %d %H:%M:%S %Y GMT" 94608000000000000 t) errors out with "Specified time is not representable" Test case: (url-cookie-handle-set-cookie "browser=68.133.6.220.1572324160979722; path=/; max-age=946080000000000000; domain=.arxiv.org") The input is completely controlled by the server, of course, and bogus data may appear in the cookie, and the URL library should protect against this, so I've now made it ignore these errors in Emacs 27. This patch may also apply to the version of Emacs you're using; I haven't checked. diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index 31fc3e7266..740a43fa16 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el @@ -304,9 +304,10 @@ url-cookie-handle-set-cookie (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) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no