From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.bugs Subject: bug#29282: 26.0.90; url-cookie.el: a cookie handling bug Date: Tue, 14 Nov 2017 08:57:51 +0900 Organization: Emacsen advocacy group Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1510617550 28925 195.159.176.226 (13 Nov 2017 23:59:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 13 Nov 2017 23:59:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (i686-pc-cygwin) To: 29282-done@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 14 00:59:06 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEOd7-0007H1-SL for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Nov 2017 00:59:05 +0100 Original-Received: from localhost ([::1]:56968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEOdF-0007Of-Cl for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 Nov 2017 18:59:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEOd8-0007Nb-W2 for bug-gnu-emacs@gnu.org; Mon, 13 Nov 2017 18:59:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEOd4-0000Ty-Vl for bug-gnu-emacs@gnu.org; Mon, 13 Nov 2017 18:59:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58645) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eEOd4-0000Tl-SS for bug-gnu-emacs@gnu.org; Mon, 13 Nov 2017 18:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eEOd4-0005gi-Iq for bug-gnu-emacs@gnu.org; Mon, 13 Nov 2017 18:59:02 -0500 In-Reply-To: Resent-From: Katsumi Yamaoka Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Nov 2017 23:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 29282 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 29282@debbugs.gnu.org, yamaoka@jpl.org, yamaoka@jpl.org Original-Received: via spool by 29282-done@debbugs.gnu.org id=D29282.151061748221784 (code D ref 29282); Mon, 13 Nov 2017 23:59:02 +0000 Original-Received: (at 29282-done) by debbugs.gnu.org; 13 Nov 2017 23:58:02 +0000 Original-Received: from localhost ([127.0.0.1]:39090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEOc6-0005f8-Ao for submit@debbugs.gnu.org; Mon, 13 Nov 2017 18:58:02 -0500 Original-Received: from mail-hampton.hostforweb.net ([205.234.186.191]:47078 helo=hampton.hostforweb.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEOc4-0005eo-GP for 29282-done@debbugs.gnu.org; Mon, 13 Nov 2017 18:58:01 -0500 Original-Received: from s70.gtokyofl21.vectant.ne.jp ([202.215.75.70]:60000 helo=localhost) by hampton.hostforweb.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) (envelope-from ) id 1eEObw-0020I4-R7 for 29282-done@debbugs.gnu.org; Mon, 13 Nov 2017 17:57:53 -0600 X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( Cancel-Lock: sha1:VeVpLVV4abdwfieFPQmpCjoB3T8= X-OutGoing-Spam-Status: No, score=-2.9 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hampton.hostforweb.net X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Get-Message-Sender-Via: hampton.hostforweb.net: authenticated_id: yamaoka/from_h X-Authenticated-Sender: hampton.hostforweb.net: yamaoka@jpl.org X-Source: X-Source-Args: X-Source-Dir: 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: 208.118.235.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:139868 Archived-At: I've installed the patch (slightly improved) in emacs-26. Eww and url package users may want to remove old cookies store. > An easy way to do that is to shutdown Emacs and to delete > the "~/.emacs.d/url/cookies" file. Thanks. On Mon, 13 Nov 2017 17:43:52 +0900, Katsumi Yamaoka wrote: > Hi, > A cookie is fed from a web site via the Set-Cookie header like > this: > Set-Cookie: NAME=VALUE; Max-Age=-86400; Expires=Sun, 12 Nov 2017 06:26:31 GMT; Path=/; HTTPOnly > In this case, NAME and VALUE appearing in the beginning is the > cookie, and the others are its attributions. However, url-cookie > recognizes Max-Age, HTTPOnly, etc. as individual cookies, and > sends them to the web site when a user posts forms in the page. > This will cause "500 Internal Server Error" in some web site[1]. > In additin, although Max-Age should be preferred to Expires[2], > url-cookie doesn't process it. > A patch is below. > [1] Try visiting and > > in turn using eww. > To try the patched url-cookie.el, you have to delete those bogus > cookies in advance. An easy way to do that is to shutdown Emacs > and to delete the "~/.emacs.d/url/cookies" file. > [2] > * lisp/url/url-cookie.el (url-cookie-handle-set-cookie): > Regard a Set-Cookie header as it contains a single cookie; > prefer Max-Age to Expires and convert it to Expires; > remove support for old time string styles. [...]