cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Problem with special chars in ftp passwords

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 14 Oct 2004 10:18:22 +0200 (CEST)

On Wed, 13 Oct 2004, Eric VERGNAUD wrote:

> ftp://user:pass?word@ftp.mydomain.com
>
> Curl fails with a "could not resolve host name" error.

...

> - is it legal to use '?' in ftp passwords ?

As Bill pointed out, it seems it is. libcurl doesn't thinks so though, so it
fails like this. Use it encoded for now to work around this flaw.

> - shouldn't the above test be skipped when protocol is ftp or ftps ?

It probably should, but as you can see in the code it has no knowledge about
that particular protocol it is at that point, and there's no legal function
for the trailing ?-letter in FTP so I don't think it makes any harm in
allowing one to terminate the host name.

I'll work on a fix.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-10-14