diff --git a/app.py b/app.py index 998ecb2..10b7c79 100644 --- a/app.py +++ b/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()) diff --git a/templates/captcha_err.html b/templates/captcha_err.html index f74ea38..84f8fb3 100644 --- a/templates/captcha_err.html +++ b/templates/captcha_err.html @@ -13,7 +13,7 @@

Error!

Incorrect CAPTCHA!
- +
diff --git a/templates/err.html b/templates/err.html index 309cdd9..dd0567e 100644 --- a/templates/err.html +++ b/templates/err.html @@ -13,7 +13,7 @@

Error!

Something went wrong on our end - the mail server could be down. Please try again later.
- +
diff --git a/templates/expired.html b/templates/expired.html new file mode 100644 index 0000000..49e20d2 --- /dev/null +++ b/templates/expired.html @@ -0,0 +1,19 @@ + + + + Error! + + + +
+ HectaMail + Sign up +
+
+

Error!

+ Your CAPTCHA has expired. Please use the "Go Back" button rather than pressing the arrow in your browser. +
+ +
+
+ diff --git a/templates/num.html b/templates/num.html index 929ed8d..0b29025 100644 --- a/templates/num.html +++ b/templates/num.html @@ -13,7 +13,7 @@

Error!

You can only have Alphanumerical characters and periods in your username!
- +
diff --git a/templates/ok.html b/templates/ok.html index 7de6726..5df633b 100644 --- a/templates/ok.html +++ b/templates/ok.html @@ -13,7 +13,7 @@

Done!

Success! Add this to your favourite email program with the infomation noted on the main page!
- +