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

WSS Broken #17

Open
robvinson opened this issue Dec 9, 2016 · 0 comments
Open

WSS Broken #17

robvinson opened this issue Dec 9, 2016 · 0 comments
Labels

Comments

@robvinson
Copy link

robvinson commented Dec 9, 2016

The SAMLRaider request editor had the string "" when intercepting some WSS SAML requests. The stack trace was a RuntimeException: "com.sun.org.apache.xerces.internal.dom.DeferredTextImpl cannot be cast to org.w3c.dom.Element". I narrowed this down to:

XMHelpers.java - getSAMLResponseOfSOAP():

Element SAMLresponseOld = (Element) body.getFirstChild();

Note: For what it's worth maybe it'd be better to use a Node here instead of element, and then check to see if the Node is of the type you are expecting?

In this case though, the first element of the body is not a SAML element, because this is WSSE everything SAML related is in the SOAP header element. Working backward and reviewing SamlTabController.java leads to the isWSSMessage boolean which is only set to true in isSAMLMessage() and only if helpers.getRequestParameter(content, "wresult") is non-null. Searching around for where the wresult parameter is set leads to getMessage():

if (isWSSMessage) {
    parameterToUpdate = "wresult";
}

Unless I've missed something, it seems isWSSMessage is only set when the wresult parameter is set, and wresult is only set when isWSSMessage is set, a circular dependency.

@robvinson robvinson changed the title WSS Issues WSS Broken Dec 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants