Generate a new token each request to /api

This commit is contained in:
Tracker-Friendly 2023-11-19 11:43:23 +00:00
parent 32ac3fb6a9
commit c3e8fcd8ce
2 changed files with 5 additions and 2 deletions

3
app.py
View File

@ -122,6 +122,9 @@ def register():
# Token mismatch, handle accordingly
return "Token Expired", 400
# Generate a new unique token for the next request
session['unique_token'] = str(uuid.uuid4())
# Report the user captcha result
print(user_captcha)

View File

@ -1,5 +1,5 @@
[HectaMail]
# Secret Key, please change to something custom
secretkey: 'your_key_here'
secretkey: secret_key_here
# The characters you allow in your CAPTCHA
captchachars: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
captchachars: ABCDEFGHIJKLMNOPQRSTUVWXYZ