-
Notifications
You must be signed in to change notification settings - Fork 343
Description
The Invite Team Member functionality is accepting duplicate case sensitive users while inviting same users with different sensitive. We should check the user exist or not from name and emailid both the columns while Invite Team Member.
Ex: Try inviting the below users and update the passwords, then you will see the difference and for the 2nd user its throwing error as per the screenshot while updating the password.
Mail Id1: Naresh.Chandra89@gmail.com
Mail Id2: naresh.chandra89@gmail.com
After invite user, I tried to update the password, so first Mail Id1 its success but 2nd Mail id2 its throwing the below error.
db.teaminvites.find();
{ "_id" : ObjectId("693e892170ff516863cdc0d8"), "teamId" : ObjectId("693e6b18e1077f08f5c4ca1a"), "email" : "naresh.chandra89@gmail.com", "token" : "471e062009427286b1bd5439ac741302d1e7a4c89ae90baca6300d59b1e4d2888", "createdAt" : ISODate("2025-12-14T09:53:37.820Z"), "updatedAt" : ISODate("2025-12-14T09:53:37.820Z"), "__v" : 0 }
{ "_id" : ObjectId("693e895770ff516863cdc139"), "teamId" : ObjectId("693e6b18e1077f08f5c4ca1a"), "email" : "Naresh.Chandra89@gmail.com", "token" : "4132ef5167e02f5c895f74fbfc9ef0a4b7b0eff4917fa22a3c0b371240a424d88", "createdAt" : ISODate("2025-12-14T09:54:31.472Z"), "updatedAt" : ISODate("2025-12-14T09:54:31.472Z"), "__v" : 0 }db.teaminvites.find();
{ "_id" : ObjectId("693e892170ff516863cdc0d8"), "teamId" : ObjectId("693e6b18e1077f08f5c4ca1a"), "email" : "naresh.chandra89@gmail.com", "token" : "471e062009427286b1bd5439ac741302d1e7a4c89ae90baca6300d59b1e4d276", "createdAt" : ISODate("2025-12-14T09:53:37.820Z"), "updatedAt" : ISODate("2025-12-14T09:53:37.820Z"), "__v" : 0 }db.users.find();
{ "_id" : ObjectId("693e6b18e1077f08f5c4ca16"), "email" : "admin@test.com", "accessKey" : "4f44bce0-f73e-45ed-b7af-e3ae8b0addf5", "salt" : "2473cd277be22fe44db4ada6f6441d3f5a35fe2deed28f96fe8be2c07af42d35", "hash" : "XXXXXXXXXXXXXXXXXXXXX", "createdAt" : ISODate("2025-12-14T07:45:28.541Z"), "updatedAt" : ISODate("2025-12-14T07:45:28.552Z"), "__v" : 0, "name" : "Admin@test.com", "team" : ObjectId("693e6b18e1077f08f5c4ca1a") }
{ "_id" : ObjectId("693e8a7770ff516863cdc24a"), "name" : "Naresh.Chandra89@gmail.com", "email" : "naresh.chandra89@gmail.com", "team" : ObjectId("693e6b18e1077f08f5c4ca1a"), "accessKey" : "d646d134-865f-4ce0-bfd2-e0dab4c17f05", "salt" : "2ec2bed9bdb952dc398d15c1a55b039cafc0ad0c67430499db0455e40079f9e1", "hash" : "XXXXXXXXXXXXXXXX", "createdAt" : ISODate("2025-12-14T09:59:19.617Z"), "updatedAt" : ISODate("2025-12-14T09:59:19.617Z"), "__v" : 0 }
While user is inviting or while user login then that time itself only convert the user mail id to lower case like may be fix the issues?
Seems after inviting user and while updating the password the functionality seems not validating the user emails properly. Name and email id must follow same case sensitivity as per the above data.