Add warning if using default password

This commit is contained in:
Taylor Helsper 2019-10-19 22:20:03 -05:00
parent f2989997b1
commit 78b3d6b16d
3 changed files with 11 additions and 1 deletions

View File

@ -134,4 +134,7 @@ def get_device_changelog():
changelog = subprocess.check_output(["cat", "/usr/share/mynode/changelog"])
except:
changelog = "ERROR"
return changelog
return changelog
def has_changed_password():
return os.path.isfile("/home/bitcoin/.mynode/.hashedpw")

View File

@ -375,6 +375,7 @@ def index():
"ram_usage": get_ram_usage(),
"swap_usage": get_swap_usage(),
"device_temp": get_device_temp(),
"has_changed_password": has_changed_password(),
"upgrade_available": upgrade_available
}
return render_template('main.html', **templateData)

View File

@ -140,6 +140,12 @@
{% include 'includes/message_display.html' %}
{% if not has_changed_password %}
<div class="upgrade_ad_main_page">
<p style="text-align: center;"><b>Warning!</b><br/>You appear to be using the default password! You should change it to something else on the <a href="/settings">settings</a> page.</p>
</div>
{% endif %}
<div class="app_tile_row">
<div>
<div class="main_header">Core Services</div>