mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 05:45:59 +01:00
bug fix: modsec default rules https://github.com/usmannasir/cyberpanel/issues/1186
This commit is contained in:
@@ -892,7 +892,7 @@ class FirewallManager:
|
|||||||
|
|
||||||
if modSecInstalled:
|
if modSecInstalled:
|
||||||
command = "sudo cat " + rulesPath
|
command = "sudo cat " + rulesPath
|
||||||
currentModSecRules = ProcessUtilities.outputExecutioner(command).split('\n')
|
currentModSecRules = ProcessUtilities.outputExecutioner(command)
|
||||||
|
|
||||||
final_dic = {'modSecInstalled': 1,
|
final_dic = {'modSecInstalled': 1,
|
||||||
'currentModSecRules': currentModSecRules}
|
'currentModSecRules': currentModSecRules}
|
||||||
@@ -908,7 +908,7 @@ class FirewallManager:
|
|||||||
rulesPath = os.path.join(virtualHostUtilities.Server_root + "/conf/rules.conf")
|
rulesPath = os.path.join(virtualHostUtilities.Server_root + "/conf/rules.conf")
|
||||||
|
|
||||||
command = "sudo cat " + rulesPath
|
command = "sudo cat " + rulesPath
|
||||||
currentModSecRules = ProcessUtilities.outputExecutioner(command).split('\n')
|
currentModSecRules = ProcessUtilities.outputExecutioner(command)
|
||||||
|
|
||||||
final_dic = {'modSecInstalled': 1,
|
final_dic = {'modSecInstalled': 1,
|
||||||
'currentModSecRules': currentModSecRules}
|
'currentModSecRules': currentModSecRules}
|
||||||
|
|||||||
@@ -705,7 +705,12 @@ class WebsiteManager:
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
admin = Administrator.objects.get(pk=userID)
|
admin = Administrator.objects.get(pk=userID)
|
||||||
|
defaultDomain = Websites.objects.get(pk=admin.defaultSite).domain
|
||||||
|
except:
|
||||||
|
defaultDomain = 'NONE'
|
||||||
|
|
||||||
url = "https://platform.cyberpersons.com/CyberpanelAdOns/Adonpermission"
|
url = "https://platform.cyberpersons.com/CyberpanelAdOns/Adonpermission"
|
||||||
data = {
|
data = {
|
||||||
@@ -725,7 +730,7 @@ class WebsiteManager:
|
|||||||
rnpss = randomPassword.generate_pass(10)
|
rnpss = randomPassword.generate_pass(10)
|
||||||
proc = httpProc(request, 'websiteFunctions/createDomain.html',
|
proc = httpProc(request, 'websiteFunctions/createDomain.html',
|
||||||
{'websiteList': websitesName, 'phps': PHPManager.findPHPVersions(), 'Randam_String': rnpss,
|
{'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()
|
return proc.render()
|
||||||
|
|
||||||
def siteState(self, request=None, userID=None, data=None):
|
def siteState(self, request=None, userID=None, data=None):
|
||||||
|
|||||||
Reference in New Issue
Block a user