diff --git a/baseTemplate/views.py b/baseTemplate/views.py index 8362cfdc6..cecbf13bb 100755 --- a/baseTemplate/views.py +++ b/baseTemplate/views.py @@ -19,7 +19,7 @@ from plogical.httpProc import httpProc # Create your views here. VERSION = '2.3' -BUILD = 4 +BUILD = 3 @ensure_csrf_cookie diff --git a/cli/cliParser.py b/cli/cliParser.py index bd7ef4231..7427e7f1f 100755 --- a/cli/cliParser.py +++ b/cli/cliParser.py @@ -58,7 +58,7 @@ class cliParser: ### Additional Arguments for user manager parser.add_argument('--firstName', help='First name while creating user.') - parser.add_argument('--lastName', help='First name while creating user.') + parser.add_argument('--lastName', help='Last name while creating user.') parser.add_argument('--websitesLimit', help='Website limit while creating user.') parser.add_argument('--selectedACL', help='Select ACL while creating user.') parser.add_argument('--securityLevel', help='Set security level while creating user.') diff --git a/dns/dnsManager.py b/dns/dnsManager.py index 7142455b6..8746c212f 100755 --- a/dns/dnsManager.py +++ b/dns/dnsManager.py @@ -257,6 +257,10 @@ class DNSManager: recordType = data['recordType'] recordName = data['recordName'] ttl = int(data['ttl']) + if ttl < 0: + raise ValueError("TTL: The item must be greater than 0") + elif ttl > 86400: + raise ValueError("TTL: The item must be lesser than 86401") admin = Administrator.objects.get(pk=userID) if ACLManager.checkOwnershipZone(zoneDomain, admin, currentACL) == 1: @@ -444,6 +448,10 @@ class DNSManager: if data['ttlNow'] != None: record.ttl = int(data['ttlNow']) + if record.ttl < 0: + raise ValueError("TTL: The item must be greater than 0") + elif record.ttl > 86400: + raise ValueError("TTL: The item must be lesser than 86401") if data['priorityNow'] != None: record.prio = int(data['priorityNow']) @@ -826,6 +834,10 @@ class DNSManager: recordType = data['recordType'] recordName = data['recordName'] ttl = int(data['ttl']) + if ttl < 0: + raise ValueError("TTL: The item must be greater than 0") + elif ttl > 86400: + raise ValueError("TTL: The item must be lesser than 86401") admin = Administrator.objects.get(pk=userID) self.admin = admin diff --git a/dns/templates/dns/addDeleteDNSRecords.html b/dns/templates/dns/addDeleteDNSRecords.html index ddf235262..6fde8f740 100755 --- a/dns/templates/dns/addDeleteDNSRecords.html +++ b/dns/templates/dns/addDeleteDNSRecords.html @@ -88,7 +88,7 @@
-
@@ -114,7 +114,7 @@
-
@@ -141,7 +141,7 @@
-
@@ -167,7 +167,7 @@
-
@@ -199,7 +199,7 @@
-
@@ -226,7 +226,7 @@
-
@@ -253,7 +253,7 @@
-
@@ -280,7 +280,7 @@
-
@@ -307,7 +307,7 @@
-
@@ -337,7 +337,7 @@ ng-model="recordName">
-
diff --git a/userManagment/views.py b/userManagment/views.py index 47dbba044..5e5c20e43 100755 --- a/userManagment/views.py +++ b/userManagment/views.py @@ -135,12 +135,12 @@ def submitUserCreation(request): selectedACL = data['selectedACL'] if ACLManager.CheckRegEx("^[\w'\-,.][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*(){}|~<>;:[\]]{2,}$", firstName) == 0: - data_ret = {'status': 0, 'createStatus': 0, 'error_message': 'First Name can only contain Alphabets and should be more then 2 characters..'} + data_ret = {'status': 0, 'createStatus': 0, 'error_message': 'First Name can only contain alphabetic characters, and should be more than 2 characters long...'} json_data = json.dumps(data_ret) return HttpResponse(json_data) if ACLManager.CheckRegEx("^[\w'\-,.][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*(){}|~<>;:[\]]{2,}$", lastName) == 0: - data_ret = {'status': 0, 'createStatus': 0, 'error_message': 'First Name can only contain Alphabets and should be more then 2 characters..'} + data_ret = {'status': 0, 'createStatus': 0, 'error_message': 'Last Name can only contain alphabetic characters, and should be more than 2 characters long...'} json_data = json.dumps(data_ret) return HttpResponse(json_data)