Skip to content

Mask recipient addresses in the e-mail service logs - #1359

Merged
helpcodeai merged 1 commit into
mainfrom
fix/mask-email-in-logs
Oct 31, 2026
Merged

helpcodeai merged 1 commit into
mainfrom
fix/mask-email-in-logs

Conversation

@helpcodeai

Copy link
Copy Markdown
Contributor

Summary

The Cloud backend log carries full recipient addresses at info level (Trial-warn3 email sent to <address>, three lines in the 31 Oct check), and the same for every other transactional mail and its failure path. Addresses are personal data and have no place in the log.

Changes

  • Every logger.log/warn/error in settings/email.service.ts that named the recipient now prints maskEmail(to) (ad***@example.com), reusing the helper from auth/mcp-email-verification.ts. 19 lines, no behaviour change.
  • Spec: sending a trial notice and a failing welcome mail logs the masked address and never the full one.

Type

  • Bug fix

Testing

  • Added/updated unit tests

In packages/backend: npx jest src/settings/email.service.spec.ts (18 passed), npx eslint on the two files, npx tsc --noEmit -p tsconfig.json. Same in Cloud and self-hosted.

Checklist

  • My code follows the existing code style
  • I have tested my changes locally
  • All existing tests pass
  • This PR has a descriptive title

Related Issues

Daily check 2026-10-31, cloud.md candidate 7b.

@helpcodeai
helpcodeai enabled auto-merge (squash) October 31, 2026 08:25
@helpcodeai
helpcodeai merged commit d74b216 into main Oct 31, 2026
15 checks passed
@helpcodeai
helpcodeai deleted the fix/mask-email-in-logs branch October 31, 2026 08:34
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant