cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: URL with @ in passwords

From: Gisle Vanem <giva_at_bgnett.no>
Date: Fri, 30 Jul 2004 16:34:12 +0200

"Daniel Stenberg" <daniel-curl_at_haxx.se> wrote:

> > Could a url like this be legalised?
> >
> >> curl -v ftp://ftp:passwd-with-@-in-it@host.foo/
>
> It could possibly be dealt with, if we made the parser scan for the _last_
> @-letter to terminate the password instead of having the _first_ @-letter
> found do it.

You mean the last '@' before the file part? So an URL
 ftp://ftp:passwd-with-@-in-it@host.foo/file-with-@-in-it

would work.

Man, this is getting complicated doing in C. I think I once
suggested using liburi or a generated scanner for this. I have
some half-finished url-parser done with GNU flex if you'd care
to look at it.

--gv
Received on 2004-07-29