[PR #4042] [MERGED] HSB-431 fix: email case sensitive in email provider #4636

Closed
opened 2026-03-17 02:09:23 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4042
Author: @mirarifhasan
Created: 5/7/2024
Status: Merged
Merged: 5/15/2024
Merged by: @balub

Base: patchHead: fix/email-case-sensitive


📝 Commits (3)

  • 6f23667 feat: code level email insensitivity added
  • 480a5f1 test: fix broken test case
  • 5d05518 chore: updated testcase for findUserByEmail in user module

📊 Changes

6 files changed (+34 additions, -20 deletions)

View changed files

📝 packages/hoppscotch-backend/src/admin/admin.service.spec.ts (+5 -1)
📝 packages/hoppscotch-backend/src/admin/admin.service.ts (+9 -3)
📝 packages/hoppscotch-backend/src/shortcode/shortcode.service.ts (+4 -1)
📝 packages/hoppscotch-backend/src/team-invitation/team-invitation.service.ts (+5 -4)
📝 packages/hoppscotch-backend/src/user/user.service.spec.ts (+2 -2)
📝 packages/hoppscotch-backend/src/user/user.service.ts (+9 -9)

📄 Description

Closes HSB-431
Closes #4027

Description

This pull request addresses a problem where user emails are treated as case-sensitive during signup. This means that signing up with user@gmail.com and USER@gmail.com would create two separate user entries in the database.

Solution

This PR implements logic to convert all email addresses to lowercase before saving them in the database. This ensures that regardless of the case used during signup, only one user entry will be created for the same email address.

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

Additional Information

Nil


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/4042 **Author:** [@mirarifhasan](https://github.com/mirarifhasan) **Created:** 5/7/2024 **Status:** ✅ Merged **Merged:** 5/15/2024 **Merged by:** [@balub](https://github.com/balub) **Base:** `patch` ← **Head:** `fix/email-case-sensitive` --- ### 📝 Commits (3) - [`6f23667`](https://github.com/hoppscotch/hoppscotch/commit/6f23667c9cecf0896c06963af7706ed38f2eb914) feat: code level email insensitivity added - [`480a5f1`](https://github.com/hoppscotch/hoppscotch/commit/480a5f1f79f997ee9dea3c42feb3c689010e4bf7) test: fix broken test case - [`5d05518`](https://github.com/hoppscotch/hoppscotch/commit/5d05518024009a0a15968b441c8cb839b9b86c1a) chore: updated testcase for findUserByEmail in user module ### 📊 Changes **6 files changed** (+34 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-backend/src/admin/admin.service.spec.ts` (+5 -1) 📝 `packages/hoppscotch-backend/src/admin/admin.service.ts` (+9 -3) 📝 `packages/hoppscotch-backend/src/shortcode/shortcode.service.ts` (+4 -1) 📝 `packages/hoppscotch-backend/src/team-invitation/team-invitation.service.ts` (+5 -4) 📝 `packages/hoppscotch-backend/src/user/user.service.spec.ts` (+2 -2) 📝 `packages/hoppscotch-backend/src/user/user.service.ts` (+9 -9) </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> <!-- Issue # here --> Closes HSB-431 Closes #4027 ### Description <!-- Add a brief description of the pull request --> This pull request addresses a problem where user emails are treated as case-sensitive during signup. This means that signing up with `user@gmail.com` and `USER@gmail.com` would create two separate user entries in the database. #### Solution This PR implements logic to convert all email addresses to lowercase before saving them in the database. This ensures that regardless of the case used during signup, only one user entry will be created for the same email address. <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Checks <!-- Make sure your pull request passes the CI checks and do check the following fields as needed - --> - [x] My pull request adheres to the code style of this project - [ ] My code requires changes to the documentation - [ ] I have updated the documentation as required - [x] All the tests have passed ### Additional Information <!-- Any additional information like breaking changes, dependencies added, screenshots, comparisons between new and old behaviour, etc. --> Nil --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:09:23 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4636
No description provided.