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] SAML login saves invalid username when receiving multiple values #18213

Merged
merged 2 commits into from
Jul 21, 2020

Conversation

pierre-lehnen-rc
Copy link
Contributor

@pierre-lehnen-rc pierre-lehnen-rc commented Jul 8, 2020

Proposed changes

  • Join all values into a single string for fields that absolutely need to be a string;
  • Change the user map JSON parser to allow specific array elements to be picked instead of the whole array.

Issue(s)

When the Idp sends multiple username values, Rocket.Chat is saving all of them as an array.
Closes #14895

How to test or reproduce

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Hotfix (a major bugfix that has to be merged asap)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Changelog

Further comments

@sampaiodiego sampaiodiego merged commit 13636d8 into develop Jul 21, 2020
@sampaiodiego sampaiodiego deleted the fix.saml-multiple-usernames branch July 21, 2020 03:15
@sampaiodiego sampaiodiego mentioned this pull request Jul 28, 2020
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.

SAML new username issue
2 participants