]> git.ipfire.org Git - thirdparty/curl.git/commit
hostip: refuse to resolve the .onion TLD
authorMatt Jolly <Matt.Jolly@footclan.ninja>
Tue, 7 Mar 2023 15:16:45 +0000 (02:16 +1100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 30 Mar 2023 13:51:06 +0000 (15:51 +0200)
commit0ae0abbe72514a75c10bfc4108d9f254f594c086
tree546b89bff46473e9f613913121aa3d4ee83a9e02
parent67546aea90176c87cd7d16c3b21a3f1ea4739447
hostip: refuse to resolve the .onion TLD

RFC 7686 states that:

> Applications that do not implement the Tor
> protocol SHOULD generate an error upon the use of .onion and
> SHOULD NOT perform a DNS lookup.

Let's do that.

https://www.rfc-editor.org/rfc/rfc7686#section-2

Add test 1471 and 1472 to verify

Fixes #543
Closes #10705
docs/KNOWN_BUGS
lib/hostip.c
tests/data/Makefile.inc
tests/data/test1471 [new file with mode: 0644]
tests/data/test1472 [new file with mode: 0644]