return 412 when alias ceration time is expired
This commit is contained in:
parent
293a5cb396
commit
28c96d0d35
|
@ -142,7 +142,7 @@ def new_custom_alias_v2():
|
||||||
alias_suffix = signer.unsign(signed_suffix, max_age=600).decode()
|
alias_suffix = signer.unsign(signed_suffix, max_age=600).decode()
|
||||||
except SignatureExpired:
|
except SignatureExpired:
|
||||||
LOG.error("Alias creation time expired for %s", user)
|
LOG.error("Alias creation time expired for %s", user)
|
||||||
return jsonify(error="alias creation is expired, please try again"), 400
|
return jsonify(error="Alias creation time is expired, please retry"), 412
|
||||||
except Exception:
|
except Exception:
|
||||||
LOG.error("Alias suffix is tampered, user %s", user)
|
LOG.error("Alias suffix is tampered, user %s", user)
|
||||||
return jsonify(error="Tampered suffix"), 400
|
return jsonify(error="Tampered suffix"), 400
|
||||||
|
@ -252,7 +252,7 @@ def new_custom_alias_v3():
|
||||||
alias_suffix = signer.unsign(signed_suffix, max_age=600).decode()
|
alias_suffix = signer.unsign(signed_suffix, max_age=600).decode()
|
||||||
except SignatureExpired:
|
except SignatureExpired:
|
||||||
LOG.error("Alias creation time expired for %s", user)
|
LOG.error("Alias creation time expired for %s", user)
|
||||||
return jsonify(error="alias creation is expired, please try again"), 400
|
return jsonify(error="Alias creation time is expired, please retry"), 412
|
||||||
except Exception:
|
except Exception:
|
||||||
LOG.error("Alias suffix is tampered, user %s", user)
|
LOG.error("Alias suffix is tampered, user %s", user)
|
||||||
return jsonify(error="Tampered suffix"), 400
|
return jsonify(error="Tampered suffix"), 400
|
||||||
|
|
Loading…
Reference in a new issue