cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: FTP 3rd party transfers

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 17 Jan 2005 10:42:18 +0100 (CET)

On Mon, 17 Jan 2005, Alexander Krasnostavsky wrote:

> Thanks for the update. You are right: the code was handling only full path
> names.

Another failure: Try using --3rd-port to specify a source server running on a
port that isn't 21...

While trying to figure out how to make it use this properly, I noticed that in
Curl_pretransfersec() (around line 2250 in lib/transfer.c) the code currently
sets

   data->set.ftpport = data->set.source_port;
   data->set.userpwd = data->set.source_userpwd;

... but it never restores the values! It doesn't even remember the old values
so it can't restore them.

This is major badness, as it breaks how libcurl will perform the next transfer
when re-using a curl handle. The variables in data->set are all set by a
user/app, and must never be modified internally.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2005-01-17