increase the expired alias creation session to 600 secs

This commit is contained in:
Son NK 2020-05-06 10:10:47 +02:00
parent d9e9a54082
commit 35b1972730
3 changed files with 6 additions and 6 deletions

View file

@ -120,9 +120,9 @@ def new_custom_alias_v2():
note = data.get("note")
alias_prefix = convert_to_id(alias_prefix)
# hypothesis: user will click on the button in the 300 secs
# hypothesis: user will click on the button in the 600 secs
try:
alias_suffix = signer.unsign(signed_suffix, max_age=300).decode()
alias_suffix = signer.unsign(signed_suffix, max_age=600).decode()
except SignatureExpired:
LOG.error("Alias creation time expired for %s", user)
return jsonify(error="alias creation is expired, please try again"), 400

View file

@ -69,9 +69,9 @@ def custom_alias():
flash("Something went wrong, please retry", "warning")
return redirect(url_for("dashboard.custom_alias"))
# hypothesis: user will click on the button in the 300 secs
# hypothesis: user will click on the button in the 600 secs
try:
alias_suffix = signer.unsign(signed_suffix, max_age=300).decode()
alias_suffix = signer.unsign(signed_suffix, max_age=600).decode()
except SignatureExpired:
LOG.error("Alias creation time expired for %s", current_user)
flash("Alias creation time is expired, please retry", "warning")

View file

@ -152,9 +152,9 @@ def authorize():
if not current_user.can_create_new_alias():
raise Exception(f"User {current_user} cannot create custom email")
# hypothesis: user will click on the button in the 300 secs
# hypothesis: user will click on the button in the 600 secs
try:
alias_suffix = signer.unsign(signed_suffix, max_age=300).decode()
alias_suffix = signer.unsign(signed_suffix, max_age=600).decode()
except SignatureExpired:
LOG.error("Alias creation time expired for %s", current_user)
flash("Alias creation time is expired, please retry", "warning")