Skip to content

Commit 970ee42

Browse files
committed
path check: listForTable
1 parent e66282e commit 970ee42

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

filemanager/filemanager.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ def listForTable(self):
4444
domainName = self.data['domainName']
4545
website = Websites.objects.get(domain=domainName)
4646

47-
if not self.data['completeStartingPath'].find(self.data['home']) > -1:
47+
pathCheck = '/home/%s' % (domainName)
48+
49+
if self.data['completeStartingPath'].find(pathCheck) == -1:
4850
return self.ajaxPre(0, 'Not allowed to browse this path, going back home!')
4951

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

0 commit comments

Comments
 (0)