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 to correctly extract the SAML Response #29

Merged

Conversation

adamretter
Copy link
Member

The SAML response is extracted from the HTTP Request Body via fn:parse-xml-fragment#1. The existing XQuery code was expecting fn:parse-xml-fragment($resp) to return a value of type element(samlp:Response), however that is incorrect in theory, and also does not work in practice (tested on eXist-db 6.x.x and 7.x.x). The W3 spec for the XQuery function fn:parse-xml-fragment#1 specifies that a value of type document-node(element(samlp:Response)) will be returned. This PR fixes that bug.

@adamretter adamretter added the bug Something isn't working label Sep 4, 2023
Copy link

@marmoure marmoure left a comment

Choose a reason for hiding this comment

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

LGTM

…cument-node(element(samlp:Response)) and not an element(samlp:response), the code was previously look for an element and not a document-node. This fix now extracts the SAML Response element from the XML Document correctly
@adamretter adamretter force-pushed the hotfix/saml-core-response-elements branch from ad16dc6 to 99dd993 Compare October 14, 2023 20:16
@dizzzz dizzzz merged commit 52b4624 into eXist-db:master Oct 16, 2023
adamretter added a commit to evolvedbinary/existdb-saml that referenced this pull request Jul 15, 2024
adamretter added a commit to evolvedbinary/existdb-saml that referenced this pull request Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants