From bc17ef673f734ea8e7e696ba5735588da9111dcd Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 5 Nov 2019 14:32:09 +0100 Subject: [PATCH] luci-mod-admin-full: proper SSID escaping in wifi join and iface overview Signed-off-by: Jo-Philipp Wich --- .../luasrc/model/cbi/admin_network/wifi_add.lua | 3 ++- .../luasrc/view/admin_network/iface_overview_status.htm | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi_add.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi_add.lua index e8a3058826..1201773aca 100644 --- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi_add.lua +++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi_add.lua @@ -6,6 +6,7 @@ local nw = require "luci.model.network" local fw = require "luci.model.firewall" local uci = require "luci.model.uci".cursor() local http = require "luci.http" +local util = require "luci.util" local iw = luci.sys.wifi.getiwinfo(http.formvalue("device")) @@ -16,7 +17,7 @@ if not iw then return end -m = SimpleForm("network", translatef("Joining Network: %q", http.formvalue("join"))) +m = SimpleForm("network", translatef("Joining Network: %q", util.pcdata(http.formvalue("join")))) m.cancel = translate("Back to scan results") m.reset = false diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview_status.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview_status.htm index 7427154a04..eab85838d1 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview_status.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview_status.htm @@ -83,7 +83,7 @@ } s.appendChild(E('br')); - s.appendChild(E('small', {}, ifc.is_alias ? '<%:Alias of "%s"%>'.format(ifc.is_alias) : ifc.name)); + s.appendChild(E('small', {}, [ ifc.is_alias ? '<%:Alias of "%s"%>'.format(ifc.is_alias) : ifc.name ])); } var d = document.getElementById(ifc.id + '-ifc-description'); -- 2.30.2