Kaydet (Commit) e9ec2e17 authored tarafından Senthil Kumaran's avatar Senthil Kumaran

merge from 3.3

Fix #17967: For ftp urls CWD to target instead of hopping to each directory
towards target. This fixes a bug where target is accessible, but parent
directories are restricted.
......@@ -2303,8 +2303,7 @@ class ftpwrapper:
self.ftp = ftplib.FTP()
self.ftp.connect(self.host, self.port, self.timeout)
self.ftp.login(self.user, self.passwd)
for dir in self.dirs:
self.ftp.cwd(dir)
self.ftp.cwd(os.path.join(*self.dirs))
def retrfile(self, file, type):
import ftplib
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment