unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 54624@debbugs.gnu.org, Aleksandr Vityazev <avityazev@posteo.org>
Subject: bug#54624: 29.0.50; textsec and ipv6 addresses
Date: Wed, 6 Apr 2022 15:28:10 +0200	[thread overview]
Message-ID: <A99DE08A-2107-4E83-A2AA-FC6FE43AB254@acm.org> (raw)
In-Reply-To: <87sfqqefgq.fsf@gnus.org>

6 apr. 2022 kl. 11.19 skrev Lars Ingebrigtsen <larsi@gnus.org>:

> Skimming that, it seems a bit too strict, but perhaps I'm misreading it.

In what way is it too strict? I can't make it less strict unless you tell me.

> Again, we're not trying to create a strict validator here.  We're just
> saying something about suspiciousness -- invalid addresses aren't, in
> and of themselves, suspicious.

That's fine, but "suspicious" is quite subjective and I need your help to define it better if I'm to write a simulator of your suspicion.

Here is a new attempt, simplified a bit:

  (rx-let ((octet (** 1 3 (in "0-9")))
           (ipv4 (: octet (= 3 "."  octet)))
           (hextet (** 1 4 (in "0-9a-f")))
           (ipv6 (: (? "::") hextet (* (or ":" "::") hextet)
                    (? ":" (or ":" ipv4)))))
    (string-match-p (rx bos (or ipv4 ipv6 (: "[" ipv6 "]")) eos)
                    domain)))

We could simplify it further and relax the requirement on octets and hextets (which seems to be what they are called, rather incongruously) but then it wouldn't catch what you previously thought were suspicious.






  reply	other threads:[~2022-04-06 13:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-29 12:36 bug#54624: 29.0.50; textsec and ipv6 addresses Aleksandr Vityazev
2022-03-29 15:12 ` Lars Ingebrigtsen
2022-04-03 16:53 ` Mattias Engdegård
2022-04-03 16:58   ` Andreas Schwab
2022-04-03 17:04     ` Mattias Engdegård
2022-04-03 17:07       ` Lars Ingebrigtsen
2022-04-03 17:09         ` Lars Ingebrigtsen
2022-04-03 17:02   ` Lars Ingebrigtsen
2022-04-03 17:16     ` Mattias Engdegård
2022-04-03 17:49       ` Andreas Schwab
2022-04-04 10:42       ` Lars Ingebrigtsen
2022-04-04 12:48         ` Mattias Engdegård
2022-04-04 13:33           ` Robert Pluim
2022-04-06  9:19           ` Lars Ingebrigtsen
2022-04-06 13:28             ` Mattias Engdegård [this message]
2022-04-07 11:04               ` Lars Ingebrigtsen
2022-04-07 17:18                 ` Mattias Engdegård
2022-04-07 22:13                   ` Andreas Schwab
2022-04-08  9:08                     ` Mattias Engdegård
2022-04-08  9:18                       ` Andreas Schwab
2022-04-08  9:25                         ` Mattias Engdegård
2022-04-11 14:29                 ` Mattias Engdegård
2022-04-11 15:34                   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A99DE08A-2107-4E83-A2AA-FC6FE43AB254@acm.org \
    --to=mattiase@acm.org \
    --cc=54624@debbugs.gnu.org \
    --cc=avityazev@posteo.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).