Skip to content

fix(schemas): exclude password hash from JSON serialization [M9]#562

Merged
lakhansamani merged 1 commit intomainfrom
fix/m9-password-tomap
Apr 4, 2026
Merged

fix(schemas): exclude password hash from JSON serialization [M9]#562
lakhansamani merged 1 commit intomainfrom
fix/m9-password-tomap

Conversation

@lakhansamani
Copy link
Copy Markdown
Contributor

Summary

  • M9 (Medium): Password hash was exposed via User.ToMap() used in email templates
  • Added json:"-" to exclude from JSON marshalling
  • DB operations (GORM, bson, cql, dynamo) unaffected — they use their own tags

Test plan

  • All packages compile
  • Verify user serialization no longer includes password field

The User.Password field was included in JSON serialization via ToMap(),
which is used in email templates and webhook payloads. This exposed
the password hash. Adding json:"-" excludes it from JSON marshal
while keeping bson/cql/dynamo tags for DB operations.

Fixes: M9 (Medium)
@lakhansamani lakhansamani merged commit 5b6e62f into main Apr 4, 2026
@lakhansamani lakhansamani deleted the fix/m9-password-tomap branch April 4, 2026 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant