mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-12 16:26:12 +01:00
symlink protection
This commit is contained in:
@@ -335,7 +335,7 @@ class FileManager:
|
||||
command = 'ls -la %s' % (self.data['fileName'])
|
||||
output = ProcessUtilities.outputExecutioner(command)
|
||||
|
||||
if output.find(website.externalApp) == -1:
|
||||
if output.find(website.externalApp) == -1 and output.find('No such file') == -1:
|
||||
return self.ajaxPre(0, 'File exists and is symlink.')
|
||||
|
||||
if self.data['fileName'].find(self.data['home']) == -1 or self.data['fileName'].find('..') > -1:
|
||||
|
||||
Reference in New Issue
Block a user