From: Yousong Zhou Date: Tue, 8 Aug 2017 03:20:20 +0000 (+0800) Subject: luci-app-shadowsocks-libev: hide key, password value in instance overview X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=refs%2Fpull%2F1289%2Fhead;p=oweals%2Fluci.git luci-app-shadowsocks-libev: hide key, password value in instance overview This is mainly for ss_server section Signed-off-by: Yousong Zhou --- diff --git a/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua b/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua index 63f7ba3c2..0a14f3355 100644 --- a/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua +++ b/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua @@ -156,6 +156,9 @@ function cfgvalue_overview_(sdata, lines, names) for _, n in ipairs(names) do local v = sdata[n] if v ~= nil then + if n == "key" or n == "password" then + v = translate("") + end local fv = "%s" % ut.pcdata(v) if sdata[".type"] ~= "ss_server" and n == "server" then fv = '%s' % {