id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,branch,branch_author,launchpad_bug
4930,FTP server lacks tests for RNTO and RNFR.,adiroiban,spiv,"calling RNTO while being authenticated, without calling RNFR will generate an unhandled exceptions since self._fromName is only defined in RNFR.

Here is a patch that identifies the problem:

Please let me know if you agree with with fix and I could provide a full patch together with the required tests.

{{{
#!diff
=== modified file 'TwistedCore-10.2.0/twisted/protocols/ftp.py'
--- TwistedCore-10.2.0/twisted/protocols/ftp.py	2010-12-23 07:46:10 +0000
+++ TwistedCore-10.2.0/twisted/protocols/ftp.py	2011-03-08 23:54:19 +0000
@@ -752,6 +752,8 @@
                 return BAD_CMD_SEQ, ""PASS required after USER""
 
         elif self.state == self.AUTHED:
+            if cmd == 'RNTO':
+                return BAD_CMD_SEQ, ""RNFR required before RNTO""
             method = getattr(self, ""ftp_"" + cmd, None)
             if method is not None:
                 return method(*params)
}}}",defect,closed,low,,ftp,fixed,,itamarst adi@… thijs,branches/ftp-rnfr-tests-4930,spiv,
