Ticket #4930 defect closed fixed
FTP server lacks tests for RNTO and RNFR.
|Reported by:||adiroiban||Owned by:||spiv|
|Cc:||itamarst, adi@…, thijs||Branch:||
(diff, github, buildbot, log)
Description (last modified by thijs) (diff)
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.
=== modified file 'TwistedCore-10.2.0/twisted/protocols/ftp.py'
752 752 return BAD_CMD_SEQ, "PASS required after USER" 753 753 754 754 elif self.state == self.AUTHED: 755 756 755 757 method = getattr(self, "ftp_" + cmd, None) 756 758 if method is not None: 757 759 return method(*params)