projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ba02ccc
)
themes: only check password for uid=0 pages, nobody cannot read shadow (#426)
author
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 6 Jun 2012 10:44:55 +0000
(10:44 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 6 Jun 2012 10:44:55 +0000
(10:44 +0000)
themes/bootstrap/luasrc/view/themes/bootstrap/header.htm
patch
|
blob
|
history
themes/freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm
patch
|
blob
|
history
themes/openwrt/luasrc/view/themes/openwrt.org/header.htm
patch
|
blob
|
history
diff --git
a/themes/bootstrap/luasrc/view/themes/bootstrap/header.htm
b/themes/bootstrap/luasrc/view/themes/bootstrap/header.htm
index 60c7a6ebcfca7bb160591cb0051c0a26c095430d..33e2e48d29ec2dfbb8308229eb17028e4a643d1f 100644
(file)
--- 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
</header>
</header>
-<%- 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 -%>
<div class="container">
<div class="alert-message warning">
<h4><%:No password set!%></h4>
<div class="container">
<div class="alert-message warning">
<h4><%:No password set!%></h4>
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 8787faed362fd53c9c9860d11caba48929490ce5..25068a2d185c0ed4ec34e0019ec028b7bad3a80a 100644
(file)
--- 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
</div></div>
<![endif]-->
</div></div>
<![endif]-->
-<%- 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 -%>
<div class="warning">
<strong><%:No password set!%></strong><br />
<%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%>
<div class="warning">
<strong><%:No password set!%></strong><br />
<%: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 ddd960401c469950b4d2e06d9f12617fd7862801..3db844570d604f6e1469afadaa454cbb9f64dcf2 100644
(file)
--- 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
</div>
</noscript>
</div>
</noscript>
- <%- 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 -%>
<div class="errorbox">
<strong><%:No password set!%></strong><br />
<%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%><br />
<div class="errorbox">
<strong><%:No password set!%></strong><br />
<%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%><br />