Add expired explanation page (#145)
This commit is contained in:
parent
40df900dc7
commit
654d03041b
2 changed files with 13 additions and 2 deletions
|
@ -184,7 +184,7 @@ def handle_password():
|
||||||
def preview_password(password_key):
|
def preview_password(password_key):
|
||||||
password_key = url_unquote_plus(password_key)
|
password_key = url_unquote_plus(password_key)
|
||||||
if not password_exists(password_key):
|
if not password_exists(password_key):
|
||||||
abort(404)
|
return render_template('expired.html'), 404
|
||||||
|
|
||||||
return render_template('preview.html')
|
return render_template('preview.html')
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ def show_password(password_key):
|
||||||
password_key = url_unquote_plus(password_key)
|
password_key = url_unquote_plus(password_key)
|
||||||
password = get_password(password_key)
|
password = get_password(password_key)
|
||||||
if not password:
|
if not password:
|
||||||
abort(404)
|
return render_template('expired.html'), 404
|
||||||
|
|
||||||
return render_template('password.html', password=password)
|
return render_template('password.html', password=password)
|
||||||
|
|
||||||
|
|
11
snappass/templates/expired.html
Normal file
11
snappass/templates/expired.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="container">
|
||||||
|
<section>
|
||||||
|
<div class="page-header"><h1>Secret not found, used or expired</h1></div>
|
||||||
|
<p class="lead">The requested URL was not found on the server. This could be because this URL never contained a secret, or because it expired or revealed earlier.</p>
|
||||||
|
<p class="lead">If this URL was sent to you by someone, make sure to check your spelling or ask the person who sent it to you to send a new secret.</p>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
Loading…
Reference in a new issue