diff --git a/dns/static/dns/dns.js b/dns/static/dns/dns.js
index 3071300e1..bcd6e5ec9 100644
--- a/dns/static/dns/dns.js
+++ b/dns/static/dns/dns.js
@@ -182,6 +182,7 @@ app.controller('addModifyDNSRecords', function($scope,$http) {
$(".nsRecord").hide();
$(".soaRecord").hide();
$(".srvRecord").hide();
+ $(".caaRecord").hide();
@@ -288,6 +289,13 @@ app.controller('addModifyDNSRecords', function($scope,$http) {
data.ttl = $scope.ttl;
data.recordType = type;
}
+ else if(type === "CAA"){
+ data.selectedZone = $scope.selectedZone;
+ data.recordName = $scope.recordName;
+ data.recordContentCAA = $scope.recordContentCAA;
+ data.ttl = $scope.ttl;
+ data.recordType = type;
+ }
diff --git a/dns/templates/dns/addDeleteDNSRecords.html b/dns/templates/dns/addDeleteDNSRecords.html
index 42b97a57e..b5476c693 100644
--- a/dns/templates/dns/addDeleteDNSRecords.html
+++ b/dns/templates/dns/addDeleteDNSRecords.html
@@ -63,6 +63,7 @@
NS
SOA
SRV
+ CAA
@@ -289,6 +290,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dns/views.py b/dns/views.py
index bda158ccd..e0815df44 100644
--- a/dns/views.py
+++ b/dns/views.py
@@ -342,6 +342,8 @@ def getCurrentRecordsForDomain(request):
fetchType = 'SOA'
elif currentSelection == 'srvRecord':
fetchType = 'SRV'
+ elif currentSelection == 'caaRecord':
+ fetchType = 'CAA'
json_data = "["
checker = 0
@@ -528,6 +530,19 @@ def addDNSRecord(request):
priority = data['priority']
DNS.createDNSRecord(zone, value, recordType, recordContentSRV, priority, ttl)
+ elif recordType == "CAA":
+
+ if recordName == "@":
+ value = zoneDomain
+ ## re.match
+ elif match(r'([\da-z\.-]+\.[a-z\.]{2,12}|[\d\.]+)([\/:?=]{1}[\da-z\.-]+)*[\/\?]?', recordName, M | I):
+ value = recordName
+ else:
+ value = recordName + "." + zoneDomain
+
+ recordContentCAA = data['recordContentCAA'] ## IP or ponting value
+
+ DNS.createDNSRecord(zone, value, recordType, recordContentCAA, 0, ttl)
final_dic = {'add_status': 1, 'error_message': "None"}
diff --git a/install/install.py b/install/install.py
index 205f81715..13bfbc057 100644
--- a/install/install.py
+++ b/install/install.py
@@ -2929,10 +2929,12 @@ def main():
checks = preFlightsChecks("/usr/local/lsws/",args.publicip,"/usr/local",cwd,"/usr/local/CyberCP")
- try:
- mysql = args.mysql
- except:
+ if args.mysql == None:
mysql = 'One'
+ preFlightsChecks.stdOut("Single MySQL instance version will be installed.")
+ else:
+ mysql = args.mysql
+ preFlightsChecks.stdOut("Dobule MySQL instance version will be installed.")
checks.checkPythonVersion()
@@ -2993,22 +2995,22 @@ def main():
checks.setupVirtualEnv()
checks.setupPHPAndComposer()
- try:
- postfix = args.postfix
- checks.enableDisableEmail(postfix)
- except:
+ if args.postfix != None:
+ checks.enableDisableEmail(args.postfix)
+ else:
+ preFlightsChecks.stdOut("Postfix will be installed and enabled.")
checks.enableDisableEmail('On')
- try:
- powerdns = args.powerdns
- checks.enableDisableDNS(powerdns)
- except:
+ if args.powerdns != None:
+ checks.enableDisableDNS(args.powerdns)
+ else:
+ preFlightsChecks.stdOut("PowerDNS will be installed and enabled.")
checks.enableDisableDNS('On')
- try:
- ftp = args.ftp
- checks.enableDisableFTP(ftp)
- except:
+ if args.ftp != None:
+ checks.enableDisableFTP(args.ftp)
+ else:
+ preFlightsChecks.stdOut("Pure-FTPD will be installed and enabled.")
checks.enableDisableFTP('On')
logging.InstallLog.writeToFile("CyberPanel installation successfully completed!")
diff --git a/static/dns/dns.js b/static/dns/dns.js
index 3071300e1..bcd6e5ec9 100644
--- a/static/dns/dns.js
+++ b/static/dns/dns.js
@@ -182,6 +182,7 @@ app.controller('addModifyDNSRecords', function($scope,$http) {
$(".nsRecord").hide();
$(".soaRecord").hide();
$(".srvRecord").hide();
+ $(".caaRecord").hide();
@@ -288,6 +289,13 @@ app.controller('addModifyDNSRecords', function($scope,$http) {
data.ttl = $scope.ttl;
data.recordType = type;
}
+ else if(type === "CAA"){
+ data.selectedZone = $scope.selectedZone;
+ data.recordName = $scope.recordName;
+ data.recordContentCAA = $scope.recordContentCAA;
+ data.ttl = $scope.ttl;
+ data.recordType = type;
+ }
diff --git a/websiteFunctions/views.py b/websiteFunctions/views.py
index c50d0fbdf..4d6dfc1d3 100644
--- a/websiteFunctions/views.py
+++ b/websiteFunctions/views.py
@@ -1262,12 +1262,12 @@ def saveRewriteRules(request):
except:
filePath = "/home/" + virtualHost + "/public_html/.htaccess"
- if admin.type != 1:
- website = Websites.objects.get(domain=virtualHost)
- if website.admin != admin:
- data_ret = {'rewriteStatus': 0, 'error_message': 'You do not own this website.'}
- json_data = json.dumps(data_ret)
- return HttpResponse(json_data)
+ if admin.type != 1:
+ website = Websites.objects.get(domain=virtualHost)
+ if website.admin != admin:
+ data_ret = {'rewriteStatus': 0, 'error_message': 'You do not own this website.'}
+ json_data = json.dumps(data_ret)
+ return HttpResponse(json_data)
## save configuration data