On Mon, Oct 21, 2024 at 9:58 AM John R. Levine <[email protected]> wrote:
> On Mon, 21 Oct 2024, Brotman, Alex wrote: > > FYI, the ticket has been closed without merging, and the existing > regular expressions will remain in the current document. > > We all agreed that the current regular expressions for IP addresses are > wrong and don't match what people send. The question was whether to try > to replace them with a long RE that exactly matches valid addresses, or a > short RE that just lists the valid characters. In the first case, it's > hard to get long RE's correct, and several people said we're not in the IP > definition business. In the latter case, the RE will let some invalid > addresses through, presumably to be rejected later by address parsers. > > It seems to me that address parsers are already going to reject addresses > that are semantically invalid, e.g., 127.1.2.3 or ::123, so also allowing > some syntactically invalid ones won't matter. > > I suggest [0-9a-f:.]+ which lists the valid characters and is very short. > Does this have to be done with a regexp? Is it enough to say "syntactically valid per RFC xxxx" (and cite something appropriate)? I ask because after poking around a bit, I found that there is (amazingly) no standard for what constitutes a syntactically valid IPv4 address. -MSK
_______________________________________________ dmarc mailing list -- [email protected] To unsubscribe send an email to [email protected]
