From: Jo-Philipp Wich Date: Wed, 4 Mar 2020 19:21:23 +0000 (+0100) Subject: luci-app-firewall: tools.firewall: properly handle protocol 0 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2c036b36ce76c3c7430bf936e131f0d9d4ab83c4;p=oweals%2Fluci.git luci-app-firewall: tools.firewall: properly handle protocol 0 The existing code failed to anticipate that '' == 0 in JS. Signed-off-by: Jo-Philipp Wich --- diff --git a/applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js b/applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js index cfa6c8365..640b28cf7 100644 --- a/applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js +++ b/applications/luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js @@ -69,7 +69,7 @@ var protocols = [ ]; function lookupProto(x) { - if (x == null || x == '') + if (x == null || x === '') return null; var s = String(x).toLowerCase();