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

refactor: stop replacing spaces in SAML artifact #1325

Merged
merged 2 commits into from
Mar 9, 2021
Merged

Conversation

mantariksh
Copy link
Contributor

Problem

In the past, SPCP SAML artifacts were not URL-encoded when we received them at our login endpoints. This means that Express would automatically parse + characters as spaces, and we had to manually change them back to +.

SAML artifacts are now URL-encoded so this is no longer necessary.

Closes #1322

Solution

Remove the code which replaced spaces with + in the SAML artifact.

Once this change was made, the parseOOBParams function was taking in the SAML artifact as a parameter and returning it unchanged. This made little sense, so the function signature was changed to stop returning the SAML artifact.

@mantariksh mantariksh marked this pull request as ready for review March 9, 2021 09:54
Copy link
Contributor

@liangyuanruo liangyuanruo left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

// Resolve known express req.query issue where pluses become spaces

This comment was so misleading - it wasn't req.query that was the issue.

@mantariksh mantariksh merged commit 5a3af4a into develop Mar 9, 2021
@tshuli tshuli mentioned this pull request Mar 10, 2021
@mantariksh mantariksh deleted the ref/saml-spaces branch April 13, 2021 06:36
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.

Remove replacing of ' ' with '+' in SPCP SAML artifact
2 participants