Permalink
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...
1 parent 318a267 commit 11d80372cf2d1ae3a0ff857752761bc125f812ce jow committed Jun 6, 2012
@@ -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>
@@ -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.%>
@@ -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 />

0 comments on commit 11d8037

Please sign in to comment.