mirror of
https://github.com/curl/curl.git
synced 2026-08-05 03:56:12 +03:00
url: reject ASCII control characters and space in host names
Host names like "127.0.0.1 moo" would otherwise be accepted by some getaddrinfo() implementations. Updated test 1034 and 1035 accordingly. Fixes #2073 Closes #2092
This commit is contained in:
parent
9554c3c6e5
commit
fa939220df
3 changed files with 47 additions and 48 deletions
|
|
@ -13,24 +13,17 @@ config file
|
|||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data>
|
||||
HTTP/1.0 503 Service Unavailable
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake swsclose
|
||||
Content-Type: text/html
|
||||
Funny-head: yesyes
|
||||
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
http
|
||||
none
|
||||
</server>
|
||||
<features>
|
||||
idn
|
||||
http
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=
|
||||
|
|
@ -54,17 +47,9 @@ url = "http://invalid-utf8-
|
|||
</client>
|
||||
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<strip>
|
||||
^User-Agent:.*
|
||||
</strip>
|
||||
<protocol>
|
||||
GET http://invalid-utf8-â<>.local/page/1034 HTTP/1.1
|
||||
Host: invalid-utf8-â<>.local
|
||||
Accept: */*
|
||||
Proxy-Connection: Keep-Alive
|
||||
|
||||
</protocol>
|
||||
<errorcode>
|
||||
3
|
||||
</errorcode>
|
||||
</verify>
|
||||
</testcase>
|
||||
|
|
|
|||
|
|
@ -12,24 +12,17 @@ FAILURE
|
|||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data>
|
||||
HTTP/1.0 503 Service Unavailable
|
||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||
Server: test-server/fake swsclose
|
||||
Content-Type: text/html
|
||||
Funny-head: yesyes
|
||||
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
http
|
||||
none
|
||||
</server>
|
||||
<features>
|
||||
idn
|
||||
http
|
||||
</features>
|
||||
<setenv>
|
||||
LC_ALL=
|
||||
|
|
@ -52,12 +45,8 @@ http://too-long-IDN-name-cürl-rüles-la-la-la-dee-da-flooby-nooby.local/page/10
|
|||
<strip>
|
||||
^User-Agent:.*
|
||||
</strip>
|
||||
<protocol>
|
||||
GET http://too-long-IDN-name-cürl-rüles-la-la-la-dee-da-flooby-nooby.local/page/1035 HTTP/1.1
|
||||
Host: too-long-IDN-name-cürl-rüles-la-la-la-dee-da-flooby-nooby.local
|
||||
Accept: */*
|
||||
Proxy-Connection: Keep-Alive
|
||||
|
||||
</protocol>
|
||||
<errorcode>
|
||||
3
|
||||
</errorcode>
|
||||
</verify>
|
||||
</testcase>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue