Skip to content
Permalink
Browse files
path check: listForTable
  • Loading branch information
usmannasir committed Jan 17, 2020
1 parent e66282e commit 970ee423c8a504c906d26e837c11167610d752b3
Showing with 3 additions and 1 deletion.
  1. +3 −1 filemanager/filemanager.py
@@ -44,7 +44,9 @@ def listForTable(self):
domainName = self.data['domainName']
website = Websites.objects.get(domain=domainName)

if not self.data['completeStartingPath'].find(self.data['home']) > -1:
pathCheck = '/home/%s' % (domainName)

if self.data['completeStartingPath'].find(pathCheck) == -1:
return self.ajaxPre(0, 'Not allowed to browse this path, going back home!')

command = "ls -la --group-directories-first " + self.returnPathEnclosed(

0 comments on commit 970ee42

Please sign in to comment.