From 76a4609c6692e61f859e7c729d9f510a4a8768d5 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Tue, 8 Aug 2017 11:20:20 +0800 Subject: [PATCH] luci-app-shadowsocks-libev: hide key, password value in instance overview This is mainly for ss_server section Signed-off-by: Yousong Zhou --- .../luasrc/model/shadowsocks-libev.lua | 3 +++ 1 file changed, 3 insertions(+) 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 63f7ba3c25..0a14f33554 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' % { -- 2.30.2