Subject: bug#54624: 29.0.50; textsec and ipv6 addresses

From: Mattias Engdegård <[email-masked]>
Date: Sun, 3 Apr 2022 18:53:05 +0200

>   (or (string-match-p "\\`\\([0-9]\\{1,3\\}\\.?\\)\\{1,4\\}\\'" domain)
>       (let ((ipv6 "\\([0-9a-f]\\{0,4\\}:?\\)\\{1,8\\}"))

Sorry, but these regexps aren't very precise, are they? They match a lot more than valid IP addresses. For example, both match "12345".

Is there any reason to be approximate here? Shouldn't be very hard to only allow well-formed addresses.