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>
This commit is contained in:
parent
102199fcbf
commit
76a4609c66
1 changed files with 3 additions and 0 deletions
|
@ -156,6 +156,9 @@ function cfgvalue_overview_(sdata, lines, names)
|
||||||
for _, n in ipairs(names) do
|
for _, n in ipairs(names) do
|
||||||
local v = sdata[n]
|
local v = sdata[n]
|
||||||
if v ~= nil then
|
if v ~= nil then
|
||||||
|
if n == "key" or n == "password" then
|
||||||
|
v = translate("<hidden>")
|
||||||
|
end
|
||||||
local fv = "<var>%s</var>" % ut.pcdata(v)
|
local fv = "<var>%s</var>" % ut.pcdata(v)
|
||||||
if sdata[".type"] ~= "ss_server" and n == "server" then
|
if sdata[".type"] ~= "ss_server" and n == "server" then
|
||||||
fv = '<a class="label" href="%s">%s</a>' % {
|
fv = '<a class="label" href="%s">%s</a>' % {
|
||||||
|
|
Loading…
Reference in a new issue