mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-03-16 01:00:17 +01:00
path check: listForTable
This commit is contained in:
@@ -44,7 +44,9 @@ class FileManager:
|
||||
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(
|
||||
|
||||
Reference in New Issue
Block a user