Skip to content

Fix node saml - #2

Merged
brandonros merged 2 commits into
masterfrom
fix-node-saml
May 9, 2020
Merged

brandonros merged 2 commits into
masterfrom
fix-node-saml

Conversation

@jonlindsey

@jonlindsey jonlindsey commented May 9, 2020 •

Copy link
Copy Markdown

Fix: During vigorous unit testing with planted errors in local functions the callback function wrapping a callback function for encryption reported 'callback already called' messages, ingesting the true error source.

Description

The wrapper fo the existing encryption callback function was changed to a promise streamlining code. Errors report perfectly back to the calling application no matter nesting level in saml20.cs.

In addition 2 error checks were added to keep needless processing cycles from occurring

  1. If the XML argument for signing is null, undefined or empty a
    'XML to sign cannot be null or empty.'
    reference error is thrown keeping the xml parser from failing.

  2. If the assertion argument to be imbedded in the response XML is undefined, null or empty a
    'Assertion XML cannot be empty for parsing while creating SAML20 Response.'
    reference error is thown keeping the parser from failing.

Testing

mocha

Checklist

This was back tested in node-sso-formatter by unit/e2e with both embedded errors insuring proper return, and 100% testing success.

@brandonros
brandonros merged commit ced0eb0 into master May 9, 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.

2 participants