diff --git a/backend/api/auth.py b/backend/api/auth.py index 3da7e40..730b352 100644 --- a/backend/api/auth.py +++ b/backend/api/auth.py @@ -19,6 +19,7 @@ Security invariants: """ from __future__ import annotations +import hashlib import uuid from typing import Literal, Optional @@ -213,7 +214,7 @@ async def login( actor_id=user.id if user else None, resource_id=None, ip_address=_ip, - metadata_={"attempted_email": str(body.email)}, + metadata_={"attempted_email_hash": hashlib.sha256(str(body.email).encode()).hexdigest()[:16]}, ) await session.commit() raise HTTPException( diff --git a/frontend/src/components/admin/AuditLogTab.vue b/frontend/src/components/admin/AuditLogTab.vue index ade4021..feb5035 100644 --- a/frontend/src/components/admin/AuditLogTab.vue +++ b/frontend/src/components/admin/AuditLogTab.vue @@ -111,7 +111,7 @@