themes: only check password for uid=0 pages, nobody cannot read shadow (#426)
This commit is contained in:
parent
ba02ccc1a5
commit
a71e441487
3 changed files with 3 additions and 3 deletions
|
@ -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="container">
|
||||||
<div class="alert-message warning">
|
<div class="alert-message warning">
|
||||||
<h4><%:No password set!%></h4>
|
<h4><%:No password set!%></h4>
|
||||||
|
|
|
@ -94,7 +94,7 @@ You may obtain a copy of the License at
|
||||||
</div></div>
|
</div></div>
|
||||||
<![endif]-->
|
<![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">
|
<div class="warning">
|
||||||
<strong><%:No password set!%></strong><br />
|
<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.%>
|
<%: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 @@ if tree.nodes[category] and tree.nodes[category].ucidata then
|
||||||
</div>
|
</div>
|
||||||
</noscript>
|
</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">
|
<div class="errorbox">
|
||||||
<strong><%:No password set!%></strong><br />
|
<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 />
|
<%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%><br />
|
||||||
|
|
Loading…
Reference in a new issue