Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

themes: only check password for uid=0 pages, nobody cannot read shado…

…w (#426)

git-svn-id: http://svn.luci.subsignal.org/luci/trunk@8701 ab181a69-ba2e-0410-a84d-ff88ab4c47bc
  • Loading branch information...
commit 11d80372cf2d1ae3a0ff857752761bc125f812ce 1 parent 318a267
jow authored
View
2  themes/bootstrap/luasrc/view/themes/bootstrap/header.htm
@@ -190,7 +190,7 @@
</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>
View
2  themes/freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm
@@ -94,7 +94,7 @@
</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.%>
View
2  themes/openwrt/luasrc/view/themes/openwrt.org/header.htm
@@ -173,7 +173,7 @@ <h2 class="navigation"><a id="navigation" name="navigation"><%:Navigation%></a><
</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 />
Please sign in to comment.
Something went wrong with that request. Please try again.