Merge branch 'stable' into v1.9.4

This commit is contained in:
Usman Nasir
2020-01-18 21:11:04 +05:00

View File

@@ -334,8 +334,9 @@ class FileManager:
fs = FileSystemStorage()
filename = fs.save(myfile.name, myfile)
finalData['fileName'] = fs.url(filename)
pathCheck = '/home/%s' % (self.data['domainName'])
if not self.data['completePath'].find(self.data['home']) > -1:
if self.data['completePath'].find(pathCheck) == -1:
return self.ajaxPre(0, 'Not allowed to move in this path, please choose location inside home!')
command = 'mv ' + self.returnPathEnclosed('/home/cyberpanel/media/' + myfile.name) + ' ' + self.returnPathEnclosed(self.data['completePath'] + '/' + myfile.name)