diff --git a/firewall/firewallManager.py b/firewall/firewallManager.py index 22ceae5ce..ef1854cb3 100755 --- a/firewall/firewallManager.py +++ b/firewall/firewallManager.py @@ -892,7 +892,7 @@ class FirewallManager: if modSecInstalled: command = "sudo cat " + rulesPath - currentModSecRules = ProcessUtilities.outputExecutioner(command).split('\n') + currentModSecRules = ProcessUtilities.outputExecutioner(command) final_dic = {'modSecInstalled': 1, 'currentModSecRules': currentModSecRules} @@ -908,7 +908,7 @@ class FirewallManager: rulesPath = os.path.join(virtualHostUtilities.Server_root + "/conf/rules.conf") command = "sudo cat " + rulesPath - currentModSecRules = ProcessUtilities.outputExecutioner(command).split('\n') + currentModSecRules = ProcessUtilities.outputExecutioner(command) final_dic = {'modSecInstalled': 1, 'currentModSecRules': currentModSecRules} diff --git a/websiteFunctions/website.py b/websiteFunctions/website.py index 998edbe84..7d34c45fd 100755 --- a/websiteFunctions/website.py +++ b/websiteFunctions/website.py @@ -705,7 +705,12 @@ class WebsiteManager: except: pass - admin = Administrator.objects.get(pk=userID) + + try: + admin = Administrator.objects.get(pk=userID) + defaultDomain = Websites.objects.get(pk=admin.defaultSite).domain + except: + defaultDomain = 'NONE' url = "https://platform.cyberpersons.com/CyberpanelAdOns/Adonpermission" data = { @@ -725,7 +730,7 @@ class WebsiteManager: rnpss = randomPassword.generate_pass(10) proc = httpProc(request, 'websiteFunctions/createDomain.html', {'websiteList': websitesName, 'phps': PHPManager.findPHPVersions(), 'Randam_String': rnpss, - 'test_domain_data': test_domain_status, 'defaultSite': admin.defaultSite}) + 'test_domain_data': test_domain_status, 'defaultSite': defaultDomain}) return proc.render() def siteState(self, request=None, userID=None, data=None):