Server: Bug in ftp listing

Need help with FileZilla Server? Something does not work as expected? In this forum you may find an answer.

Moderator: Project members

Post Reply
Message
Author
Valheru
500 Command not understood
Posts: 2
Joined: 2004-03-20 00:37

Server: Bug in ftp listing

#1 Post by Valheru » 2004-03-20 00:52

Hello,

I noticed there is a bug in the directory listing: According to RFC, there should be only one (!) space between the date and the filename (2003 and 7z311.exe in the example below). If there is more than one space then according to RFC this means the filename's first character(s) are spaces. In the example below this was not the case. There were printed two spaces printed when there sould have been only printed one (beacuse the filename did not begin with a space character).

This can cause severe errors e.g. ftp indexing tools because they interpret the listing that the filename contains spaces but in fact it does not and all the indexing gets messed.

Code: Select all

ftp> ls
200 Port command successful
150 Opening data channel for directory list.
-r-xr-xr-x   1 ftp      ftp        919756 Nov 01 2003  7z311.exe
-r-xr-xr-x   1 ftp      ftp        942512 Dec 15 2003  7z313.exe
Please correct this as I assume it's easy to fix. Thanks!

User avatar
botg
Site Admin
Posts: 35563
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

#2 Post by botg » 2004-03-20 11:26

To which RFC are you referring to?
The relavant RFC for FTP (RFC 959) does not specify any particular format for the directory listings. (*sigh*)Instead it does mention that NLST is the command other programs (like indexing tools) should use to process the files automatically.
LIST (LIST)

[...]
Since the information on a file may vary widely from system
to system
, this information may be hard to use automatically
in a program, but may be quite useful to a human user.

NAME LIST (NLST)

[...]
This command is intended
to return information that can be used by a program to
further process the files automatically. For example, in
the implementation of a "multiple get" function.
The current behaviour of Filezilla Server is to start the filename at a fixed position (if possible) in the directory listing. Since year (4 chars) and time (5 chars) don't appear at the same time, a padding space was added behind the year. I've now change the code so that this space gets added to the front of the year instead.

PS:
It's very bad style to start or end filenames with spaces. The responsible admin which allows this get's too much money imo.

Valheru
500 Command not understood
Posts: 2
Joined: 2004-03-20 00:37

#3 Post by Valheru » 2004-03-20 15:36

thanks alot i think this solves the problem! :D

when do you expect the next release oth the server containing the change?

User avatar
botg
Site Admin
Posts: 35563
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

#4 Post by botg » 2004-03-20 19:25

Released when it's done.

Post Reply