Uploaded image for project: 'FtpServer'
  1. FtpServer
  2. FTPSERVER-287

NLST: Implementation only supports listing files in working directory [patch provided]

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.1.0
    • 1.0.2, 1.1.0
    • Core
    • None
    • Fedora 10-64bit and RH 5.2-64bit, Java 1.6.0_12-64

    Description

      The NLST formatter, as implemented on trunk is insufficient to handle any request other than a file within in the current working directory. Some examples:

      ftp> passive
      Passive mode on.
      ftp> nlist /directory/file.txt
      227 Entering Passive Mode (127,0,0,1,179,241)
      150 File status okay; about to open data connection.
      file.txt
      226 Closing data connection.

      Other FTP servers return the following:

      ftp> passive
      Passive mode on.
      ftp> nlist /directory/file.txt
      227 Entering Passive Mode (127,0,0,1,179,241)
      150 File status okay; about to open data connection.
      /directory/file.txt
      226 Closing data connection.

      Upon investigating, I found that the formatter will not handle absolute file requests, parent directory request or non-absolute child directory requests. It does not error, it just doesn't give useful output.

      I've modified the code to handle the cases that I could come up with, but there may be other situations that need to be covered. I'm not an expert on the FTP specification (but what I could find was not impressive), so there many be additional cases that need to be covered.

      Please consider the attached patch, with accompanying test cases

      Attachments

        1. nlst.patch
          43 kB
          Dennis Keller

        Activity

          People

            Unassigned Unassigned
            kellerds Dennis Keller
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: