From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#54624: 29.0.50; textsec and ipv6 addresses Date: Mon, 4 Apr 2022 14:48:37 +0200 Message-ID: <871F72AF-D4A2-4C68-9FF8-AF290103E0EA@acm.org> References: <87ee2ehzh6.fsf@gnus.org> <13DB0609-9BEB-42E5-BF2E-B29638A7F3E1@acm.org> <87czhxgmdt.fsf@gnus.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19608"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54624@debbugs.gnu.org, Aleksandr Vityazev To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 04 14:50:35 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nbMAF-0004s7-7f for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Apr 2022 14:50:35 +0200 Original-Received: from localhost ([::1]:33698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nbMAE-0002fO-3A for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Apr 2022 08:50:34 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbM8k-0001EL-B0 for bug-gnu-emacs@gnu.org; Mon, 04 Apr 2022 08:49:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56900) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nbM8j-0002k8-V9 for bug-gnu-emacs@gnu.org; Mon, 04 Apr 2022 08:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nbM8j-0003MF-Qa for bug-gnu-emacs@gnu.org; Mon, 04 Apr 2022 08:49:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Apr 2022 12:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54624 X-GNU-PR-Package: emacs Original-Received: via spool by 54624-submit@debbugs.gnu.org id=B54624.164907652912888 (code B ref 54624); Mon, 04 Apr 2022 12:49:01 +0000 Original-Received: (at 54624) by debbugs.gnu.org; 4 Apr 2022 12:48:49 +0000 Original-Received: from localhost ([127.0.0.1]:50797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbM8X-0003Ln-K5 for submit@debbugs.gnu.org; Mon, 04 Apr 2022 08:48:49 -0400 Original-Received: from mail1448c50.megamailservers.eu ([91.136.14.48]:44364 helo=mail265c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbM8V-0003LX-C4 for 54624@debbugs.gnu.org; Mon, 04 Apr 2022 08:48:48 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1649076520; bh=iRriLCO4KWZEp+FjCllQT0l1Cf3zYUJUXgvYYeBw2Sw=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=eYiKebluW/3J3fpbI/P14Ov3gZARZRhCTba+qaRF4LTHvAynVQAauKmsTst+FXWGg kCzPpgX/YFYrccR0/UaHmxC4Z7z/fRXLyPbmo/efaHbLPH4dgexg+WIVjuiCy/L6mi 5S0JTacu8g+o2DT8ZsrY1PjG6ZC1ZBk5k2qxaGqc= Feedback-ID: mattiase@acm.or Original-Received: from smtpclient.apple (c-b952e353.032-75-73746f71.bbcust.telenor.se [83.227.82.185]) (authenticated bits=0) by mail265c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 234Cmb8a015445; Mon, 4 Apr 2022 12:48:39 +0000 In-Reply-To: <87czhxgmdt.fsf@gnus.org> X-Mailer: Apple Mail (2.3654.120.0.1.13) X-CTCH-RefID: str=0001.0A742F29.624AE928.0016, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-Origin-Country: SE X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:229408 Archived-At: 4 apr. 2022 kl. 12.42 skrev Lars Ingebrigtsen : > Fine by me, but addresses that are too long should be suspicious (to > catch people obfuscating by doing things like 000000000000000127.0.0.1 > and similar). That's what I was intending to catch with the {} things > without having to actually do the hard maths myself. :-) I agree that is desirable. If a strict parse is impractical (not sure if = it is), what about something slightly stricter than what we current = have? Here is a straw-man proposal: (rx-let ((octet (or "0" (: (in "1-9") (? (in "0-9") (? (in = "0-9")))))) (ipv4 (: octet (=3D 3 "." octet))) (hextet (** 1 4 (in "0-9a-f"))) (ipv6 (: (? "::") hextet (* ":" (? ":") hextet) (? (or "::" (: ":" ipv4) ))))) (rx bos (or ipv4 ipv6 (: "[" ipv6 "]")) eos)) and don't forget to bind case-fold-search to nil while calling = string-match-p since IPv6 specifies lower-case hex digits. And thanks to Andreas for reminding me about IPv6 allowing dotted quads = as well.