Skip to content

Commit 5dc9899

Browse files
committed
symlink protection
1 parent 5436f9b commit 5dc9899

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

filemanager/filemanager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def writeFileContents(self):
335335
command = 'ls -la %s' % (self.data['fileName'])
336336
output = ProcessUtilities.outputExecutioner(command)
337337

338-
if output.find(website.externalApp) == -1 and output.find('No such file') == -1:
338+
if output.find('lrwxrwxrwx') > -1 and output.find('->') > -1:
339339
return self.ajaxPre(0, 'File exists and is symlink.')
340340

341341
if self.data['fileName'].find(self.data['home']) == -1 or self.data['fileName'].find('..') > -1:

0 commit comments

Comments
 (0)