mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-08 22:05:08 -05:00
fix(backend): mask email PII in waitlist logging
Avoid logging raw email addresses by masking to first char + domain. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2138,9 +2138,11 @@ async def add_user_to_waitlist(
|
||||
where={"id": waitlist_id},
|
||||
data={"unaffiliatedEmailUsers": current_emails},
|
||||
)
|
||||
logger.info(f"Email {email} added to waitlist {waitlist_id}")
|
||||
# Mask email for logging to avoid PII exposure
|
||||
masked = email.split("@")[0][0] + "***@" + email.split("@")[1] if "@" in email else "***"
|
||||
logger.info(f"Email {masked} added to waitlist {waitlist_id}")
|
||||
else:
|
||||
logger.debug(f"Email {email} already on waitlist {waitlist_id}")
|
||||
logger.debug(f"Email already exists on waitlist {waitlist_id}")
|
||||
|
||||
# Re-fetch to return updated data
|
||||
updated_waitlist = await prisma.models.WaitlistEntry.prisma().find_unique(
|
||||
|
||||
Reference in New Issue
Block a user