Skip to content

fix(security): make email storage/representation consistent across register, profile, and lookup #301

Description

Summary

Registration stores plaintext email (auth_handler.go:308), profile update stores hashUserEmail(email) (user/service.go:188), while FindByEmail always hashes using another "EMAIL:"+sha256[:16] scheme in auth_handler.go:722. Registered emails never match FindByEmail - a data-integrity and PII-consistency bug.

Acceptance Criteria

  • Single canonical email representation (decide hash vs plaintext + encryption)
  • All writes and lookups use the same transform
  • Data-migration/backfill for existing rows
  • Tests for round-trip consistency

Complexity

High.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programhigh-complexityHigh-complexity backend task requiring deep architectural worksecuritySecurity vulnerability

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions