Ticket UUID: | 3312880 | |||
Title: | FTP command "RNFR" checks filesystem paths | |||
Type: | Bug | Version: | None | |
Submitter: | rkeene | Created on: | 2011-06-07 03:06:37 | |
Subsystem: | ftpd | Assigned To: | andreas_kupries | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2011-08-10 03:39:54 | |
Resolution: | Fixed | Closed By: | andreas_kupries | |
Closed on: | 2011-08-09 20:39:54 | |||
Description: |
RNFR checks the native filesystem for the pathname specified. The offending logic is: if {[file exists $path]} {...} This will fail unless you are using the native filesystem driver and a docroot of "/" To check for existence, perhaps rename could be called with "newname" of "" (empty string) ? | |||
User Comments: |
andreas_kupries added on 2011-08-10 03:39:54:
allow_comments - 1 Fixed in CVS head. Plus a fix in ftpd::fsFile::fs (branch 'rename', sock -> outchan). rkeene added on 2011-06-23 23:03:52: File Added - 415767: ftpd1.2.5-bug3312880.diff rkeene added on 2011-06-07 10:55:48: --- ftpd1.2.5/ftpd.tcl(revision 2177) +++ ftpd1.2.5/ftpd.tcl(working copy) @@ -1301,7 +1301,7 @@ set path [file join $data(cwd) $filename] - if {[file exists $path]} { + if {[::ftpd::Fs exists $path]} { if {[::ftpd::hasCallback authFileCmd]} { set cmd $::ftpd::cfg(authFileCmd) lappend cmd $data(user) $path write @@ -1358,7 +1358,7 @@ } - if {![catch {::ftpd::Fs rename $data(renameFrom) $path} msg]} { + if {![catch {::ftpd::Fs rename $data(renameFrom) $path $sock} msg]} { unset data(renameFrom) } else { unset data(renameFrom) |
Attachments:
- ftpd1.2.5-bug3312880.diff [download] added by rkeene on 2011-06-23 23:03:52. [details]