Browse Source

radius port min and max validation plus set password maxlength

Avetisyan Karen 3 years ago
parent
commit
fab972a705

BIN
web_interface/dist/wui-11/main.js


BIN
web_interface/dist/wui-11/settings.html


+ 1 - 1
web_interface/src/wui-11/main.js

@@ -154,6 +154,7 @@ function formValidation(){
   if ($('rs_enabled').checked) {
   if ($('rs_enabled').checked) {
     if(!ValidateIPaddress(rs_server, ' IP-адрес RADIUS сервера')) flag = false;
     if(!ValidateIPaddress(rs_server, ' IP-адрес RADIUS сервера')) flag = false;
     if(!ValidateNumber(rs_port, ' Порт RADIUS сервера')) flag = false;
     if(!ValidateNumber(rs_port, ' Порт RADIUS сервера')) flag = false;
+    if(!ValidateMinMax(rs_port, ' Порт RADIUS сервера')) flag = false;
     if(!ValidateAlphanumeric(rs_key, ' Код атрибута access RADIUS сервера')) flag = false;
     if(!ValidateAlphanumeric(rs_key, ' Код атрибута access RADIUS сервера')) flag = false;
   }
   }
   if(ups_cell_min > ups_cell_max) {
   if(ups_cell_min > ups_cell_max) {
@@ -1026,7 +1027,6 @@ function settingsGET(){
     telnetState();
     telnetState();
     syslogState();
     syslogState();
     radiusState();
     radiusState();
-    authState();
     timesetType($('ntp'));
     timesetType($('ntp'));
     ftpSettings();
     ftpSettings();
 
 

+ 2 - 2
web_interface/src/wui-11/settings.html

@@ -417,11 +417,11 @@
       </div>
       </div>
       <label for="rs_port" class="col span_1_of_2">Порт</label>
       <label for="rs_port" class="col span_1_of_2">Порт</label>
       <div class="col span_1_of_2">
       <div class="col span_1_of_2">
-        <input type="text" class="form-control" id="rs_port" name="rs_port" maxlength="5">
+        <input type="text" class="form-control" id="rs_port" name="rs_port" maxlength="5" minimum="1" maximum="65535">
       </div>
       </div>
       <label for="rs_pwd" class="col span_1_of_2">Пароль</label>
       <label for="rs_pwd" class="col span_1_of_2">Пароль</label>
       <div class="col span_1_of_2">
       <div class="col span_1_of_2">
-        <input type="text" class="form-control" id="rs_pwd" name="rs_pwd">
+        <input type="text" class="form-control" id="rs_pwd" name="rs_pwd" maxlength="16">
       </div>
       </div>
       <label for="rs_key" class="col span_1_of_2 hidden">Код access</label>
       <label for="rs_key" class="col span_1_of_2 hidden">Код access</label>
       <div class="col span_1_of_2 hidden">
       <div class="col span_1_of_2 hidden">