Skip to content

Commit

Permalink
[FIX] User merge by e-mail on OAuth is case-sensitive (#27167)
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusbsilva137 authored and MartinSchoeler committed Nov 28, 2022
1 parent 37ef9b3 commit ed46775
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/meteor/app/models/server/models/Users.js
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ export class Users extends Base {

findOneByEmailAddressAndServiceNameIgnoringCase(emailAddress, userId, serviceName, options) {
const query = {
'emails.address': String(emailAddress).trim().toLowerCase(),
'emails.address': new RegExp(`^${escapeRegExp(String(emailAddress).trim())}$`, 'i'),
[`services.${serviceName}.id`]: userId,
};

Expand Down

0 comments on commit ed46775

Please sign in to comment.