diff --git a/app/dashboard/views/alias_contact_manager.py b/app/dashboard/views/alias_contact_manager.py index 0f5e9671c..f5c543211 100644 --- a/app/dashboard/views/alias_contact_manager.py +++ b/app/dashboard/views/alias_contact_manager.py @@ -234,7 +234,11 @@ def delete_contact(alias: Alias, contact_id: int): def alias_contact_manager(alias_id): highlight_contact_id = None if request.args.get("highlight_contact_id"): - highlight_contact_id = int(request.args.get("highlight_contact_id")) + try: + highlight_contact_id = int(request.args.get("highlight_contact_id")) + except ValueError: + flash("Invalid contact id", "error") + return redirect(url_for("dashboard.index")) alias = Alias.get(alias_id) diff --git a/server.py b/server.py index bb2e5c9ad..43317caac 100644 --- a/server.py +++ b/server.py @@ -206,6 +206,7 @@ def load_user(alternative_id): user = User.get_by(alternative_id=alternative_id) if user and user.disabled: return None + sentry_sdk.set_user({"email": user.email, "id": user.id}) return user