From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS24940 94.130.0.0/16 X-Spam-Status: No, score=-3.6 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS, UNPARSEABLE_RELAY shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [94.130.110.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 999F01F910 for ; Sat, 26 Nov 2022 17:00:18 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.b="KTK61cuL"; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 5A98D7E673; Sat, 26 Nov 2022 17:00:11 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=KTK61cuL; dkim-atps=neutral Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 843707E6A1 for ; Sat, 26 Nov 2022 17:00:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc; s=s1; bh=PRsXoDDWPJSYxLbIrnaT9OaQtwLvIvwBaI+PY+pLN1Y=; b=KTK61cuLN618TW7aGn50CXpQikUaGUCNoQ4tar8z1mBmPq+6o+QDsxFHIhNXvd4ki1To cpUokP98Y6/SmfVcsKE4EHwEOKjkbVpttpa8zv5/mFvQr+Vaaq+cdiV6aXfW69H8EQyvty wZ/zhHS5cL63rtzeTvheKn04ObY5nsopmbKAlznRXzYghRys0YPqpd0pqGKCD0cM+kLE+g jto7z/TFY4ZomiUjb0km0R8zewnfyOpwYvuLdtWw+MYKUGiC/Qev83ciIVeFUIpicuqRep SDvtGqeRFmmFf03ujUYPFezpbCCtUhV4ZIe4bR1Fo3GhjQJzvoovRUQmkNrmNgfA== Received: by filterdrecv-69c5db5cf4-trbpt with SMTP id filterdrecv-69c5db5cf4-trbpt-1-63824615-4E 2022-11-26 17:00:05.671500727 +0000 UTC m=+755516.931830225 Received: from herokuapp.com (unknown) by geopod-ismtpd-1-7 (SG) with ESMTP id 6SCWf9tAS0ub98OeTqi-hg for ; Sat, 26 Nov 2022 17:00:05.655 +0000 (UTC) Date: Sat, 26 Nov 2022 17:00:05 +0000 (UTC) From: "mame (Yusuke Endoh)" Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 19153 X-Redmine-Issue-Author: cpinto X-Redmine-Sender: mame X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-Redmine-MailingListIntegration-Message-Ids: 87369 X-SG-EID: =?us-ascii?Q?YbSlef6ZOa=2FS=2FuqSxXRzl42MttQDxKOujGe43WuBjI7JKMg2OkmRsyzG5za6L9?= =?us-ascii?Q?e1flZkYZ9OViVy5Lc4acvpZism08RroaVYB=2F6Ji?= =?us-ascii?Q?kTmtdEi5bcm0WoJ+4kxoy1KkRBWsj1BdeVok=2FSh?= =?us-ascii?Q?f8PoPP+tJsdSQqt8tBA4f=2F9feZl0xWlD7i96gQY?= =?us-ascii?Q?Khv8UpNIPADu3UwGq4mjulh7K1PRSZ+BLocaW05?= =?us-ascii?Q?D0oB0F3bxNerISHlzZ12WZlMZQT4osMAO0Zc8tV?= =?us-ascii?Q?Bf50oAC0oLnmPI3BKCOow=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== Message-ID-Hash: UEHXHK4M63L5SNRLRTJETJOUFH23AJPC X-Message-ID-Hash: UEHXHK4M63L5SNRLRTJETJOUFH23AJPC X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:111023] [Ruby master Bug#19153] Since 2.7.7 CGI::Cookie raises ArgumentError when cookie domains is prefixed with a dot List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #19153 has been updated by mame (Yusuke Endoh). This issue is discussed at https://github.com/ruby/cgi/pull/29 . As I wrote in https://github.com/ruby/cgi/pull/29#issuecomment-1325852303, RFC 6265 prohibits leading dot for Cookie domain. However, the old spec of Cookie (RFC 2109) required the leading dot. I think it is reasonable to allow leading dots. @akr @naruse What do you think? ---------------------------------------- Bug #19153: Since 2.7.7 CGI::Cookie raises ArgumentError when cookie domains is prefixed with a dot https://bugs.ruby-lang.org/issues/19153#change-100277 * Author: cpinto (Celso Pinto) * Status: Open * Priority: Normal * ruby -v: ruby 2.7.7p221 (2022-11-24 revision 168ec2b1e5) [arm64-darwin22] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- The rspec tests of our Rails app started failing with an ArgumentError after upgrading to 2.7.7. On inspection, the issue seems to be caused by CGI::Cookie.domain=: ``` def domain=(str) if str and ((str = str.b).bytesize > 255 or !DOMAIN_VALUE_RE.match?(str)) raise ArgumentError, "invalid domain: #{str.dump}" end @domain = str end ``` Setting a breakpoint: 0> str => ".example.com" 0> DOMAIN_VALUE_RE => /\A(?