From d9e9a5408258b15a7ed9e96c0cda1929c5e8668e Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Wed, 6 May 2020 10:09:17 +0200 Subject: [PATCH] add more info in "alias expire" error --- app/api/views/new_custom_alias.py | 2 +- app/dashboard/views/custom_alias.py | 2 +- app/oauth/views/authorize.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/api/views/new_custom_alias.py b/app/api/views/new_custom_alias.py index 5d6a6596..b9a03556 100644 --- a/app/api/views/new_custom_alias.py +++ b/app/api/views/new_custom_alias.py @@ -124,7 +124,7 @@ def new_custom_alias_v2(): try: alias_suffix = signer.unsign(signed_suffix, max_age=300).decode() except SignatureExpired: - LOG.error("Alias creation time expired") + LOG.error("Alias creation time expired for %s", user) return jsonify(error="alias creation is expired, please try again"), 400 except Exception: LOG.error("Alias suffix is tampered, user %s", user) diff --git a/app/dashboard/views/custom_alias.py b/app/dashboard/views/custom_alias.py index b7fda5da..2921f70b 100644 --- a/app/dashboard/views/custom_alias.py +++ b/app/dashboard/views/custom_alias.py @@ -73,7 +73,7 @@ def custom_alias(): try: alias_suffix = signer.unsign(signed_suffix, max_age=300).decode() except SignatureExpired: - LOG.error("Alias creation time expired") + LOG.error("Alias creation time expired for %s", current_user) flash("Alias creation time is expired, please retry", "warning") return redirect(url_for("dashboard.custom_alias")) except Exception: diff --git a/app/oauth/views/authorize.py b/app/oauth/views/authorize.py index 9e2cc933..0e07df48 100644 --- a/app/oauth/views/authorize.py +++ b/app/oauth/views/authorize.py @@ -156,7 +156,7 @@ def authorize(): try: alias_suffix = signer.unsign(signed_suffix, max_age=300).decode() except SignatureExpired: - LOG.error("Alias creation time expired") + LOG.error("Alias creation time expired for %s", current_user) flash("Alias creation time is expired, please retry", "warning") return redirect(request.url) except Exception: