From 2c036b36ce76c3c7430bf936e131f0d9d4ab83c4 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 4 Mar 2020 20:21:23 +0100 Subject: [PATCH] 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 --- .../htdocs/luci-static/resources/tools/firewall.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 cfa6c83651..640b28cf74 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(); -- 2.30.2