Skip to content
Permalink
Browse files
symlink protection
  • Loading branch information
usmannasir committed Feb 6, 2020
1 parent 5436f9b commit 5dc98995447d8716c8c30b2183e3b0b9efdd3bf0
Showing 1 changed file with 1 addition and 1 deletion.
@@ -335,7 +335,7 @@ def writeFileContents(self):
command = 'ls -la %s' % (self.data['fileName'])
output = ProcessUtilities.outputExecutioner(command)

if output.find(website.externalApp) == -1 and output.find('No such file') == -1:
if output.find('lrwxrwxrwx') > -1 and output.find('->') > -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:

0 comments on commit 5dc9899

Please sign in to comment.