On Fri, May 28, 2004 at 04:36:06AM -0700, Roboco Sanchez wrote:
> Just tried lftp-3.0.5rc2. There is a new problem this
> time. Please see the log below. Note that I must use
> set ftp:fxp-passive-source no here. It works fine with
> set ftp:ssl-protect-fxp yes but not with set
> ftp:ssl-protect-fxp no.

Please try attached patch for rc2.

> As for FEAT, what is the standard between sending FEAT
> before login and sending FEAT after login? If Raiden
> doesn't conform the standard I can try asking them.

Yes. There are two problems:
   1. FEAT should be allowed before login as it contains information about
   AUTH command, which is used before login. I don't remember if it is in
   some standard or draft, but it is common sense.
   2. The code 500 should not be used to indicate impropriate use of command
   before login. Instead, 530 should be used.

--
   Alexander.
Index: ftpclass.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/ftpclass.cc,v
retrieving revision 1.328
diff -u -p -r1.328 ftpclass.cc
--- ftpclass.cc 28 May 2004 11:48:13 -0000      1.328
+++ ftpclass.cc 28 May 2004 12:59:21 -0000
@@ -280,6 +280,11 @@ void Ftp::NoFileCheck(int act)
       SetError(NO_FILE,all_lines);
       return;
    }
+   if(copy_mode!=COPY_NONE)
+   {
+      copy_failed=true;
+      return;
+   }
    DataClose();
    state=EOF_STATE;
    eof=false;
@@ -366,7 +371,7 @@ void Ftp::TransferCheck(int act)
         real_pos=pos=p;
       return;
    }
-   if(copy_mode!=COPY_NONE && act==425)
+   if(copy_mode!=COPY_NONE && is4xx(act))
    {
       copy_passive=!copy_passive;
       copy_failed=true;
@@ -1859,7 +1864,7 @@ int   Ftp::Do()
         ipv4_pasv:
 #endif
 #ifdef USE_SSL
-           if(copy_mode!=COPY_NONE && conn->prot=='P' && !conn->sscn_on)
+           if(copy_mode!=COPY_NONE && conn->prot=='P' && !conn->sscn_on && 
copy_ssl_connect)
               conn->SendCmd("CPSV"); // same as PASV, but server does SSL_connect
            else
 #endif // note the following statement

Reply via email to