FeatureFuel
0

Canonicalize internationalized email domains for storage and exact matching

Source: twentyhq/twenty#25815 · opened by @tomjtobinn
Bug Description Internationalized email domains are accepted but are stored and filtered as raw strings rather than a canonical IDNA representation. Semantically equivalent addresses can therefore fail exact matching and bypass the primary-email unique constraint. For example, Twenty currently accepts both forms: 💩.la resolves to the ASCII IDNA form xn--ls8h.la, but an eq/in filter for one spelling does not match a record stored with the other spelling. Both spellings can also be stored as separate unique primary emails. Domain casing creates the same class of mismatch because email values are returned unchanged by validation and exact filters compile to raw PostgreSQL equality. This was confirmed against current main by inspecting: • emailSchema, which accepts Unicode email values. • validateEmailsPrimaryEmailSubfieldOrThrow, which returns the original value without normalization. • computeWhereConditionParts, where eq and in compare the supplied value direct…

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests