curl/tests/data/test1472
Matt Jolly 0ae0abbe72
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
2023-03-30 15:51:06 +02:00

40 lines
453 B
Plaintext

<testcase>
<info>
<keywords>
Onion
Tor
FAILURE
</keywords>
</info>
#
# Server-side
<reply>
</reply>
#
# Client-side
<client>
<server>
none
</server>
<name>
Fail to resolve .onion. TLD
</name>
<command>
tasty.onion.
</command>
</client>
#
# Verify data after the test has been "shot"
<verify>
# Couldn't resolve host name
<errorcode>
6
</errorcode>
<stderr mode="text">
curl: (6) Not resolving .onion address (RFC 7686)
</stderr>
</verify>
</testcase>