fix: duplicate username when inviting to team#13478
fix: duplicate username when inviting to team#13478AnthonyJHizon wants to merge 2 commits intocalcom:mainfrom
Conversation
…within the same org
|
@AnthonyJHizon is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link. |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 Seventy-two Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored. |
RFC 3986 - https://datatracker.ietf.org/doc/html/rfc3986#section-2.2 I dont have much context on this issue but i dont think We rely on our usernames for booking pages -> cal.com/sean-brydon We can't have cal.com/sean@brydon as I would probably recommend following one of the delimiters mentioned in the RFC above
CC: @zomars |
I was not aware the usernames were used to generate page links for bookings. |
zomars
left a comment
There was a problem hiding this comment.
I'm going to agree with @sean-brydon here. We don't want @ in URLs in here.
|
Closing for now. Feel free to re-open. 🙏🏽 |
What does this PR do?
Fixes 500 case when duplicate username when inviting to team
Approach: Uses '@' instead of '-' to separate name and domain name for non auto accepted email domains.
Bug was caused by cases:
Email 1, Email 2
adam-gmail@autoAcceptedEmailDomain.com, adam@gmail.com
Generated usernames: adam-gmail, adam-gmail
Email 1, Email 2
joe-flowers@autoAcceptedEmailDomain.com, joe@flowers.com
Generated usernames: joe-flowers, joe-flowers
Since '-' is a valid character in an email address.
Consider using '@' as a delimiter when identifying non auto accepted email domains.
Limited fix to only when inserting to database.
Might cause mismatch when comparing username queried from database and slugify(username)
Fixes #13464
Type of change