mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-06 21:35:55 +01:00
bug fix: file manager
This commit is contained in:
@@ -1000,6 +1000,15 @@ class WebsiteManager:
|
||||
else:
|
||||
fileName = "/home/" + self.domain + "/logs/" + self.domain + ".error_log"
|
||||
|
||||
command = 'ls -la %s' % fileName
|
||||
result = ProcessUtilities.outputExecutioner(command)
|
||||
|
||||
if result.find('->') > -1:
|
||||
final_json = json.dumps(
|
||||
{'status': 0, 'logstatus': 0,
|
||||
'error_message': "Symlink attack."})
|
||||
return HttpResponse(final_json)
|
||||
|
||||
## get Logs
|
||||
website = Websites.objects.get(domain=self.domain)
|
||||
|
||||
@@ -1059,6 +1068,15 @@ class WebsiteManager:
|
||||
|
||||
fileName = "/home/" + self.domain + "/logs/" + self.domain + ".error_log"
|
||||
|
||||
command = 'ls -la %s' % fileName
|
||||
result = ProcessUtilities.outputExecutioner(command)
|
||||
|
||||
if result.find('->') > -1:
|
||||
final_json = json.dumps(
|
||||
{'status': 0, 'logstatus': 0,
|
||||
'error_message': "Symlink attack."})
|
||||
return HttpResponse(final_json)
|
||||
|
||||
## get Logs
|
||||
website = Websites.objects.get(domain=self.domain)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user