From: "Ludovic Courtès" <ludo@gnu.org>
To: Julien Lepiller <julien@lepiller.eu>
Cc: 40582-done@debbugs.gnu.org
Subject: bug#40582: Valid URIs are rejected
Date: Thu, 18 Jun 2020 17:07:57 +0200 [thread overview]
Message-ID: <871rmcjtte.fsf@gnu.org> (raw)
In-Reply-To: <1CE6246D-B9ED-46F7-83F3-A51F0797C991@lepiller.eu> (Julien Lepiller's message of "Wed, 17 Jun 2020 21:17:11 -0400")
Hi,
Julien Lepiller <julien@lepiller.eu> skribis:
> Le 17 juin 2020 17:57:33 GMT-04:00, "Ludovic Courtès" <ludo@gnu.org> a écrit :
[...]
>>The regexp below is still an approximation, but I think a better one.
>>Can you confirm?
>>
>>Thanks,
>>Ludo’.
>
> Looks slightly better, thanks.
>
> That's still incorrect, as it will match things that are not ipv6 addresses. Does it have to be a regexp though? Why not simply check (false-if-exception (inet-pton AF_INET6 host)), as in the return value of valid-host?
Using a regexp makes the code closer to the RFC since the RFC explicitly
describes the grammar. It’s also the simple choice here.
> There's also a ipv6-host-pat that has an incorrect regexp, but I'm not sure what it is used for.
It’s use for ‘authority-regexp’, but that one is fine: it requires
square brackets around IPv6 addresses.
Pushed as 1ab2105339f60dba20c8c9680e49110501f3a6a0.
Thanks,
Ludo’.
prev parent reply other threads:[~2020-06-18 15:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-12 19:44 bug#40582: Valid URIs are rejected Julien Lepiller
2020-06-17 21:57 ` Ludovic Courtès
2020-06-18 1:17 ` Julien Lepiller
2020-06-18 15:07 ` Ludovic Courtès [this message]
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/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871rmcjtte.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=40582-done@debbugs.gnu.org \
--cc=julien@lepiller.eu \
/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.
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).