From: Jo-Philipp Wich Date: Mon, 16 Dec 2019 17:01:10 +0000 (+0100) Subject: luci-mod-network: fix rebind list validation X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9c88db57fe8fba53f63d23ae509759f6fbf166e0;p=oweals%2Fluci.git luci-mod-network: fix rebind list validation Fixes: 62e28f4b0 ("luci-mod-network: dhcp.js: fix address and rebind list validation") Signed-off-by: Jo-Philipp Wich (cherry picked from commit 3cdd4969466de7efd2cfe0534119acdc6f35218e) --- diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js index a20ecca5b..97befef29 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js @@ -76,6 +76,9 @@ function validateHostname(sid, s) { } function validateAddressList(sid, s) { + if (s == null || s == '') + return true; + var m = s.match(/^\/(.+)\/$/), names = m ? m[1].split(/\//) : [ s ];