Generate a new token each request to /api
This commit is contained in:
parent
32ac3fb6a9
commit
c3e8fcd8ce
3
app.py
3
app.py
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue