Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not store modified email when deduping email list #4232

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

knolleary
Copy link
Member

Fixes #4222

Description

A previous fix (#2543) was applied to de-duplicate the emails provided in the Team Invite flow, including stripping . from gmail addresses.

However, stripping the . lead to an unexpected behaviour:

  1. User invites foo.bar@gmail.com
  2. Owner of that email receives it at foobar@gmail.com, follows the link
  3. Sees the email field pre-filled as foobar@gmail.com - corrects it to their preferred address foo.bar@gmail.com
  4. They sign-up, but with a different email than stored in the team invite - so they don't get added to the team

This fixes this scenario by still deduplicating the emails via their canonical version, but it then stores the unaltered email rather than the canonical version. This better aligns with the expected result.

Copy link

codecov bot commented Jul 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.64%. Comparing base (e1cc16f) to head (856039c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4232   +/-   ##
=======================================
  Coverage   78.64%   78.64%           
=======================================
  Files         286      286           
  Lines       13119    13123    +4     
  Branches     2934     2935    +1     
=======================================
+ Hits        10317    10321    +4     
  Misses       2802     2802           
Flag Coverage Δ
backend 78.64% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hardillb hardillb merged commit a934275 into main Jul 22, 2024
14 checks passed
@hardillb hardillb deleted the 4222-fix-email-deduplication branch July 22, 2024 14:16
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.

External invites stripping '.' from email addresses
2 participants