New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with LIST -a /test #407

Open
guppy opened this Issue Nov 23, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@guppy

guppy commented Nov 23, 2016

A client of ours noticed that Netbeans wasn't working properly with our FTP server but worked fine with PureFTPd and vsftpd. Here's a sample of the work flow done through lsftp:

lftp guppy@localhost:~> cd test
cd ok, cwd=/test
lftp guppy@localhost:/test> ls -a
-rw-rw-rw- 1 ftpuser ftpuser 1939 Nov 22 18:18 utils.pm
lftp guppy@localhost:/test> ls -a /test
lftp guppy@localhost:/test>

For the sake of this issue, our Netbeans project is set to use / as it's root. The first thing it does is a LIST -a / (which fails as well, same issue), I put a hack in place to strip "-a /" and now I can get a file listing, if I click on one of the directories that it showed me, the first thing it does is a CWD to that directory and the LIST -a /directory.

This works fine in PureFTPd and vsftpd but not in pyftpdlib. I'm not sure what the standard is but given two very popular FTP servers support it, I think pyftpdlib should as well.

@giampaolo

This comment has been minimized.

Show comment
Hide comment
@giampaolo

giampaolo Nov 24, 2016

Owner

Yes, this should definitively be handled by pyftpdlib. I don't have time to work on a patch.
If you want, feel free to submit a pull request.
This is where it is supposed to be done:

elif cmd == 'LIST':

...as you see, the code already handles the case where uncompliant clients specify "-a", "-l" etc. but not the case where a path occurs after "-a" / "-l" (e.g. LIST -l /foo/bar).

Owner

giampaolo commented Nov 24, 2016

Yes, this should definitively be handled by pyftpdlib. I don't have time to work on a patch.
If you want, feel free to submit a pull request.
This is where it is supposed to be done:

elif cmd == 'LIST':

...as you see, the code already handles the case where uncompliant clients specify "-a", "-l" etc. but not the case where a path occurs after "-a" / "-l" (e.g. LIST -l /foo/bar).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment