luci-mod-network: fix rebind list validation
authorJo-Philipp Wich <jo@mein.io>
Mon, 16 Dec 2019 17:01:10 +0000 (18:01 +0100)
committerJo-Philipp Wich <jo@mein.io>
Mon, 16 Dec 2019 17:01:50 +0000 (18:01 +0100)
Fixes: 62e28f4b0 ("luci-mod-network: dhcp.js: fix address and rebind list validation")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js

index 69dd057c676b136214dcb89b7a292e5c8beb7f0c..430dc6601a2476e6656aab0c824f2136b41a756f 100644 (file)
@@ -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 ];