Updated buttons to refresh and made token expire page
This commit is contained in:
parent
01d7cb5ab0
commit
96651720fd
2
app.py
2
app.py
|
@ -120,7 +120,7 @@ def register():
|
|||
# Check if the submitted token matches the one in the session
|
||||
if submitted_token != session.get('unique_token'):
|
||||
# Token mismatch, handle accordingly
|
||||
return "Token Expired", 400
|
||||
return render_template('expired.html'), 400
|
||||
|
||||
# Generate a new unique token for the next request
|
||||
session['unique_token'] = str(uuid.uuid4())
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<h1>Error!</h1>
|
||||
<p1>Incorrect CAPTCHA!</p1>
|
||||
<div class=spacer2>
|
||||
<button onclick="history.back()">Go Back</button>
|
||||
<button onclick="location.href = '/register';">Go Back</button>
|
||||
</div>
|
||||
</div>
|
||||
</body><style type="text/css"></style></html>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<h1>Error!</h1>
|
||||
<p1>Something went wrong on our end - the mail server could be down. Please try again later.</p1>
|
||||
<div class=spacer2>
|
||||
<button onclick="history.back()">Go Back</button>
|
||||
<button onclick="location.href = '/register';">Go Back</button>
|
||||
</div>
|
||||
</div>
|
||||
</body><style type="text/css"></style></html>
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>Error!</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="headerbar">
|
||||
<a href="/">HectaMail</a>
|
||||
<a class="main" href="/register">Sign up</a>
|
||||
</div>
|
||||
<div class="content">
|
||||
<h1>Error!</h1>
|
||||
<p1>Your CAPTCHA has expired. Please use the "Go Back" button rather than pressing the arrow in your browser.</p1>
|
||||
<div class=spacer2>
|
||||
<button onclick="location.href = '/register';">Go Back</button>
|
||||
</div>
|
||||
</div>
|
||||
</body><style type="text/css"></style></html>
|
|
@ -13,7 +13,7 @@
|
|||
<h1>Error!</h1>
|
||||
<p1>You can only have Alphanumerical characters and periods in your username!</p1>
|
||||
<div class=spacer2>
|
||||
<button onclick="history.back()">Go Back</button>
|
||||
<button onclick="location.href = '/register';">Go Back</button>
|
||||
</div>
|
||||
</div>
|
||||
</body><style type="text/css"></style></html>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<h1>Done!</h1>
|
||||
<p1>Success! Add this to your favourite email program with the infomation noted on the main page!</p1>
|
||||
<div class=spacer2>
|
||||
<button onclick="window.location.replace('/')">Go to home</button>
|
||||
<button onclick="location.href = '/';">Go to home</button>
|
||||
</div>
|
||||
</div>
|
||||
</body><style type="text/css"></style></html>
|
||||
|
|
Loading…
Reference in New Issue