mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 13:56:01 +01:00
bug fix to fm after security improvements
This commit is contained in:
@@ -365,7 +365,7 @@ class FileManager:
|
||||
finalData['fileName'] = fs.url(filename)
|
||||
pathCheck = '/home/%s' % (self.data['domainName'])
|
||||
|
||||
if self.data['completePath'].find(pathCheck) == -1 or self.data['completePath'].find('..') > -1:
|
||||
if (self.data['completePath'] + '/' + myfile.name).find(pathCheck) == -1 or ((self.data['completePath'] + '/' + myfile.name)).find('..') > -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)
|
||||
|
||||
Reference in New Issue
Block a user