Log in

View Full Version : Very nasty listing bug


roeltje
01-11-2003, 07:35 AM
Make in unix a username / group with ' ' (spaces) in it.
make it longer then 8 bytes.

I run ProFtpD, and when I try to list a dir with files created with that user... they are just not shown in the listview.

roeltje
01-18-2003, 09:25 AM
Not responding in anyway will definitely let me post more bug-reports. As a developer myself I appriciate bug-reports always very much, but hell, that is me.

bigstar
01-18-2003, 02:58 PM
When the listing format is seperated by spaces, spaces within the group or name will conflict with the listing format.

It will be very unlikely that you can find a ftp client that can correctly handle this type of file listing.

Our ftp parser will not handle it.

roeltje
01-19-2003, 03:52 PM
I'm writing my own ftp client at the moment... that is how I come on probs like this.

The best way I resolved this, is the next thing:


drwx------ 5 roeltje 513 4096 Jan 13 16:41 roeltje
drwx------ 2 la la la la 4096 Jan 11 12:46 la la
-rw------- 1 roel roel 559 May 22 2002 pico.save


the date is always in a same format. I run a test from the last byte of the name string, there I will look for numbers, when I found 2 numbers after each other (time xx:xx or year xxxx). Then I will look for spaces that are always the same in the date. If I found the the spaces, I will copy the 3 bytes which I think are the month to an 3 char big array, compare it with the 12 possible values of months. Then if this is true, I'm almost sure I got the position of the date, I can run from there the filename + the filesize. The directory / rights info is clear also. only the group and user are not 100% trackable.. but well these are not that nessacary to know. This is of coarse not a 100% bugfree algoritm, but I will be kind enough to send you my ftp client so you can see it will work.

darkone
01-19-2003, 05:39 PM
Actually this is not the best solution for the purpose.

Somewhat better solution is to search for first ':' character - as user/group names cannot contain spaces in unix (':' is used as seperator in group & passwd files) & start decoding string.
Previous method only works for files/directories that are from current year. If decoding fails (files is too old - does not contain HH:MM), you can use less accurate method like: looking for first 4chars long figure, which has digit or 2chars long figure between 1 & 31 on its' left side.. and so on.

Note that there is no way to get accurate user/group name from line such as:
drwx------ 5 usernam e g ro upname 4096 Jan 13 16:41 roeltje

Ps. admins that use spaces in usernames should be punished (There is usually description field that you can use for real name)

roeltje
01-20-2003, 01:03 PM
you are right about the ':' b/c they are used in the passwd file so it is forbidden to use it. but well what ya said old files with years can't be detect by that, that is why I use the other check... well you can actually use both checks then the system is almost bug free.

anyway flashfxp will maybe support this feature sometime...

bigstar
01-20-2003, 11:59 PM
FlashFXP looks for the date pattern, however only to a certain degree.. when the groups/users contain a space it puts the date field out of search bounds.

I can't say for certain if FlashFXP will support this combination. There are no immediate plans to do.