Tk Library Source Code

Artifact [e024c8d9d3]
Login

Artifact e024c8d9d32d72be7e2516b42e31f57ccf87df41:

Attachment "ftpd1.2.5-bug3312900.diff" to ticket [3312900fff] added by rkeene 2011-06-23 23:03:38.
diff -uNr ftpd1.2.5-orig//ftpd.tcl ftpd1.2.5-bug3312900/ftpd.tcl
--- ftpd1.2.5-orig//ftpd.tcl	2011-06-06 22:59:33.000000000 +0000
+++ ftpd1.2.5-bug3312900/ftpd.tcl	2011-06-23 15:57:02.338732940 +0000
@@ -824,7 +824,14 @@
 	return
     }
 
-    set data(cwd) [file join $data(cwd) $relativepath]
+    set path [file join $data(cwd) $relativepath]
+
+    if {[::ftpd::Fs exists $path]} {
+        puts $sock "550 not a directory"
+        return
+    }
+
+    set data(cwd) $path
     puts $sock "250 CWD command successful."
     return
 }