From a71e4414875f5e6373887323f07f2d6c70bc1afa Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 6 Jun 2012 10:44:55 +0000 Subject: themes: only check password for uid=0 pages, nobody cannot read shadow (#426) --- themes/bootstrap/luasrc/view/themes/bootstrap/header.htm | 2 +- themes/freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm | 2 +- themes/openwrt/luasrc/view/themes/openwrt.org/header.htm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/bootstrap/luasrc/view/themes/bootstrap/header.htm b/themes/bootstrap/luasrc/view/themes/bootstrap/header.htm index 60c7a6ebc..33e2e48d2 100644 --- a/themes/bootstrap/luasrc/view/themes/bootstrap/header.htm +++ b/themes/bootstrap/luasrc/view/themes/bootstrap/header.htm @@ -190,7 +190,7 @@ You may obtain a copy of the License at -<%- if luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%> +<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>

<%:No password set!%>

diff --git a/themes/freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm b/themes/freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm index 8787faed3..25068a2d1 100644 --- a/themes/freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm +++ b/themes/freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm @@ -94,7 +94,7 @@ You may obtain a copy of the License at
-<%- if luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%> +<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
<%:No password set!%>
<%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%> diff --git a/themes/openwrt/luasrc/view/themes/openwrt.org/header.htm b/themes/openwrt/luasrc/view/themes/openwrt.org/header.htm index ddd960401..3db844570 100644 --- a/themes/openwrt/luasrc/view/themes/openwrt.org/header.htm +++ b/themes/openwrt/luasrc/view/themes/openwrt.org/header.htm @@ -173,7 +173,7 @@ if tree.nodes[category] and tree.nodes[category].ucidata then
- <%- if luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%> + <%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
<%:No password set!%>
<%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%>
-- cgit v1.2.3