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

Only make an attribute an object if it has child elements #464

Merged
merged 2 commits into from
Oct 13, 2020

Conversation

mans0954
Copy link
Contributor

This PR

  • Adds a test for an empty SAML AttributeValue, which should be represented as undefined
  • Changes the attrValueMapper behaviour so that it returns the value of _ (which will be the char value string or undefined) unless the SAML AttributeValue has child elements, in which case it returns the AttributeValue as an object.

Branch https://github.com/node-saml/passport-saml/tree/csh-issue-459-attr-value-regression-ec presents an alternative approach which would have wider impact/implications.

Closes #459

@cjbarth
Copy link
Collaborator

cjbarth commented Oct 13, 2020

This seems like the correct solution to resolve the regression, however, I am interested in hearing comments from others about the bigger change for the next semver major release.

@mans0954 mans0954 merged commit cbd1bc3 into master Oct 13, 2020
@mans0954 mans0954 deleted the csh-issue-459-attr-value-regression-some branch October 13, 2020 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Regression between 1.2.0 and 1.3.5 for undefined values
2 participants