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
|
# Token mismatch, handle accordingly
|
||||||
return "Token Expired", 400
|
return "Token Expired", 400
|
||||||
|
|
||||||
|
# Generate a new unique token for the next request
|
||||||
|
session['unique_token'] = str(uuid.uuid4())
|
||||||
|
|
||||||
# Report the user captcha result
|
# Report the user captcha result
|
||||||
print(user_captcha)
|
print(user_captcha)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[HectaMail]
|
[HectaMail]
|
||||||
# Secret Key, please change to something custom
|
# Secret Key, please change to something custom
|
||||||
secretkey: 'your_key_here'
|
secretkey: secret_key_here
|
||||||
# The characters you allow in your CAPTCHA
|
# The characters you allow in your CAPTCHA
|
||||||
captchachars: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
captchachars: ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||||
|
|
Loading…
Reference in New Issue