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

[FIX] Case insensitive SAML email check #8216

Conversation

arminfelder
Copy link
Contributor

@arminfelder arminfelder commented Sep 20, 2017

this fix, makes the email lookup for saml accounts case insensitve
fixes #8215

@engelgabriel engelgabriel added this to the 0.59.0-rc.7 milestone Sep 20, 2017
@@ -102,8 +102,9 @@ Accounts.registerLoginHandler(function(loginRequest) {
}

if (loginResult && loginResult.profile && loginResult.profile.email) {
const emailRegex = new RegExp(`^${ loginResult.profile.email }$`, 'i');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, you should escape the string to insert in regex, you can use s.escapeRegExp or RegExp.escape

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@rodrigok rodrigok modified the milestones: 0.59.0-rc.7, 0.59.0-rc.8 Sep 20, 2017
@arminfelder arminfelder changed the title case insesitive saml email check [FIX] case insesitive saml email check Sep 20, 2017
@RocketChat RocketChat deleted a comment Sep 20, 2017
@rodrigok rodrigok changed the title [FIX] case insesitive saml email check [FIX] Case insensitive SAML email check Sep 21, 2017
@rodrigok rodrigok merged commit 0b7fecc into RocketChat:develop Sep 21, 2017
rodrigok added a commit that referenced this pull request Sep 23, 2017
…nsensitveEmail

[FIX] Case insensitive SAML email check
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.

meteor SAML detect existing user by email case insensitive
3 participants