diff options
author | Yousong Zhou <yszhou4tech@gmail.com> | 2017-08-08 11:20:20 +0800 |
---|---|---|
committer | Yousong Zhou <yszhou4tech@gmail.com> | 2017-08-08 11:25:22 +0800 |
commit | 76a4609c6692e61f859e7c729d9f510a4a8768d5 (patch) | |
tree | 4f3226a8974d352910bddd920e664ab895a267f9 /applications/luci-app-shadowsocks-libev/luasrc | |
parent | 102199fcbffe80c3b9fef38270f1f69bf3d7c65a (diff) |
luci-app-shadowsocks-libev: hide key, password value in instance overview
This is mainly for ss_server section
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat (limited to 'applications/luci-app-shadowsocks-libev/luasrc')
-rw-r--r-- | applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua | 3 |
1 files changed, 3 insertions, 0 deletions
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("<hidden>") + end local fv = "<var>%s</var>" % ut.pcdata(v) if sdata[".type"] ~= "ss_server" and n == "server" then fv = '<a class="label" href="%s">%s</a>' % { |