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

From: Mattias Engdegård <[email-masked]>
Date: Thu, 7 Apr 2022 19:18:33 +0200

7 apr. 2022 kl. 13.04 skrev Lars Ingebrigtsen <[email-masked]>:

> I don't really read rx syntax well, but that seems reasonable to me on
> first sight.

Sorry! Here is a more conservative change that only alters a few minor details in your original code, written in the way that you prefer:

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