mirror of
https://github.com/unraid/webgui.git
synced 2026-01-23 09:59:59 -06:00
Fixed regex validation for IPv4 (e.g. 208.67.220.220 now works)
This commit is contained in:
@@ -18,7 +18,7 @@ Png="ethernet.png"
|
||||
$build = false;
|
||||
$template = '/usr/local/emhttp/webGui/EthX.page';
|
||||
$ini = '/var/local/emhttp/network.ini';
|
||||
$validIP = '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)';
|
||||
$validIP = '((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)';
|
||||
|
||||
// get available ethernet ports (excluding eth0)
|
||||
exec("ip -br addr|grep -Po '^eth[1-9]+\s'",$ports);
|
||||
@@ -233,7 +233,7 @@ function portcheck_eth0() {
|
||||
}
|
||||
function portToggle(port,cmd) {
|
||||
$.post('/webGui/include/PortToggle.php',{port:port,cmd:cmd},function(){refresh();});
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
var ctrl = "<span id='wait_eth0' class='status red' style='display:none;font-size:small;font-style:italic'>Please wait... configuring interfaces</span>";
|
||||
var form = document.eth0_settings;
|
||||
|
||||
Reference in New Issue
Block a user