mirror of
https://github.com/simple-login/app.git
synced 2025-10-06 05:17:41 +08:00
use warning log level for tampered alias
This commit is contained in:
parent
0bb10d8fc3
commit
9237f43c19
3 changed files with 4 additions and 4 deletions
|
@ -144,7 +144,7 @@ def new_custom_alias_v2():
|
||||||
LOG.warning("Alias creation time expired for %s", user)
|
LOG.warning("Alias creation time expired for %s", user)
|
||||||
return jsonify(error="Alias creation time is expired, please retry"), 412
|
return jsonify(error="Alias creation time is expired, please retry"), 412
|
||||||
except Exception:
|
except Exception:
|
||||||
LOG.exception("Alias suffix is tampered, user %s", user)
|
LOG.warning("Alias suffix is tampered, user %s", user)
|
||||||
return jsonify(error="Tampered suffix"), 400
|
return jsonify(error="Tampered suffix"), 400
|
||||||
|
|
||||||
if not verify_prefix_suffix(user, alias_prefix, alias_suffix):
|
if not verify_prefix_suffix(user, alias_prefix, alias_suffix):
|
||||||
|
@ -254,7 +254,7 @@ def new_custom_alias_v3():
|
||||||
LOG.warning("Alias creation time expired for %s", user)
|
LOG.warning("Alias creation time expired for %s", user)
|
||||||
return jsonify(error="Alias creation time is expired, please retry"), 412
|
return jsonify(error="Alias creation time is expired, please retry"), 412
|
||||||
except Exception:
|
except Exception:
|
||||||
LOG.exception("Alias suffix is tampered, user %s", user)
|
LOG.warning("Alias suffix is tampered, user %s", user)
|
||||||
return jsonify(error="Tampered suffix"), 400
|
return jsonify(error="Tampered suffix"), 400
|
||||||
|
|
||||||
if not verify_prefix_suffix(user, alias_prefix, alias_suffix):
|
if not verify_prefix_suffix(user, alias_prefix, alias_suffix):
|
||||||
|
|
|
@ -94,7 +94,7 @@ def custom_alias():
|
||||||
flash("Alias creation time is expired, please retry", "warning")
|
flash("Alias creation time is expired, please retry", "warning")
|
||||||
return redirect(url_for("dashboard.custom_alias"))
|
return redirect(url_for("dashboard.custom_alias"))
|
||||||
except Exception:
|
except Exception:
|
||||||
LOG.exception("Alias suffix is tampered, user %s", current_user)
|
LOG.warning("Alias suffix is tampered, user %s", current_user)
|
||||||
flash("Unknown error, refresh the page", "error")
|
flash("Unknown error, refresh the page", "error")
|
||||||
return redirect(url_for("dashboard.custom_alias"))
|
return redirect(url_for("dashboard.custom_alias"))
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,7 @@ def authorize():
|
||||||
flash("Alias creation time is expired, please retry", "warning")
|
flash("Alias creation time is expired, please retry", "warning")
|
||||||
return redirect(request.url)
|
return redirect(request.url)
|
||||||
except Exception:
|
except Exception:
|
||||||
LOG.exception("Alias suffix is tampered, user %s", current_user)
|
LOG.warning("Alias suffix is tampered, user %s", current_user)
|
||||||
flash("Unknown error, refresh the page", "error")
|
flash("Unknown error, refresh the page", "error")
|
||||||
return redirect(request.url)
|
return redirect(request.url)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue