Mailinglist Archive: proxy-suite (21 mails)

< Previous Next >
Re: [proxy-suite] Wrong Answer from FTP-Proxy
  • From: Marius Tomaschewski <mat@xxxxxxxxxxx>
  • Date: Thu, 27 Sep 2001 10:03:28 +0000 (UTC)
  • Message-id: <20010927120610.A29891@xxxxxxxxxxx>
Hi!

On Thu, Sep 27, 2001 at 09:26:41AM +0200, Roloff, Dirk wrote:
> Hi George,
>
> > Indeed is very strange what is happening there. If I understand well,
> > there are other FTP proxies which are working well, right? If you are
>
> The first Part of my posting was the Proxy-output wich has the problem.
> I have no proxy-installation that work with this back-ftp. As well with
> hundrets of other back-ftp Server this proxy installation works very
> well.
>
>
> > connecting from a working FTP proxy to the same back FTP machine, does
> > it have the same problem? Try to look for strange characters
> > in the back
> > FTP server 220 reply. Do this for us:
> >
> > 1) Connect on shell on the machine running the FTP proxy
> > 2) telnet on the port 21 on the same back FTP server
> > 3) send us the output
>
> That was what i did in the second part of my posting. Ok i didnt use
> telnet but i think netcat will do the same for me.

netcat is also fine.

> I also piped the output in a file an had a view with hexedit on it.
> No nonprintable chars in there and all lines ended with 0x0D 0x0A.
>
> Here again the output from netcat back-ftp 21:
> -> 220- XXX FTP-Server
> -> 220 xxxxxxxxxx.xxx.de FTP server (Version
> 6.4/OpenBSD/Linux-ftpd-0.16) ready.
> <- USER someone
> -> 331 Password:
> <- QUIT
> -> 221 Goodbye.

Ahh.. I see it now :-)

It seems to be a bug in the proxy...

[Except an RFC explicitely says, that the first welcome msg
have to be on-line message... If it have to be on-line here
(I don't think so), we need a config-switch to enable an
multiline welcome msgs handling here, otherwise it's simply
seems to be a bug in the proxy.]

The server sends a multiline response here as per RFC 959:

220-First line
More lines...
220 Last line

or RFC 2228:

600-First line
600-More lines...
600 Last line

Which RFC is used, we can't see here, because it are only
two lines - it also doesn't mater.

If I see it correctly, the proxy takes does not discard
this lines propelly - it passes it througt to the client.

See ftp-client.c, client_srv_ctrl_read, line 589ff.

I'll see how to fix this bug while this weekend...

Bye,
Marius.
--
° --- Marius Tomaschewski <mat@xxxxxxxxxxx>, Germany --- °
The number of UNIX installations has grown to 10, with
more expected.
- The Unix Programmer's Manual, 2nd Edition, June 1972

< Previous Next >
References