Tk Library Source Code

View Ticket
Login
Ticket UUID: 3312860
Title: Many FTP commands do not handle commands with absolute paths
Type: Bug Version: None
Submitter: rkeene Created on: 2011-06-07 02:17:27
Subsystem: ftpd Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2013-07-04 17:25:16
Resolution: Not Applicable Here Closed By:
    Closed on:
Description:
Many FTP commands such as "APPE", "STOR", and "RETR" do not handle pathname arguments that are absolute pathnames -- they instead get the current working directory appended to them as relative paths.

This is due to the use of the following idiom:
          set path [file join $data(cwd) [string trimleft $filename /]]

Suggested fix is to remove the [string trimleft] call, which will result in the "path" variable containing the correct absolute path when an absolute path is supplied and when a relative path is supplied.
User Comments: andreas_kupries added on 2011-08-10 03:23:20:
Trying to remember this may have been done as a primitive form of a path jail, i.e. to keep absolute paths within the basedir assigned to the user. I'll have to check this a bit more however.

rkeene added on 2011-06-23 23:04:06:

File Added - 415768: ftpd1.2.5-bug3312860.diff

Attachments: