[cpp-sp COMMIT] in /branches/REL_2/shibsp/handler/impl: AssertionConsumerService.cpp SAML1Consumer.cpp
noreply at shibboleth.net
noreply at shibboleth.net
Thu Feb 2 22:18:31 GMT 2012
Author: scantor
Date: Thu Feb 2 22:18:31 2012
New Revision: 3571
URL: http://svn.shibboleth.net/view/cpp-sp?rev=3571&view=rev
Log:
https://issues.shibboleth.net/jira/browse/SSPCPP-383
Modified:
branches/REL_2/shibsp/handler/impl/AssertionConsumerService.cpp
branches/REL_2/shibsp/handler/impl/SAML1Consumer.cpp
Modified: branches/REL_2/shibsp/handler/impl/AssertionConsumerService.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/handler/impl/AssertionConsumerService.cpp?rev=3571&r1=3570&r2=3571&view=diff
==============================================================================
--- branches/REL_2/shibsp/handler/impl/AssertionConsumerService.cpp (original)
+++ branches/REL_2/shibsp/handler/impl/AssertionConsumerService.cpp Thu Feb 2 22:18:31 2012
@@ -159,7 +159,6 @@
);
string relayState;
- bool relayStateOK = true;
scoped_ptr<XMLObject> msg;
try {
// Decode the message and process it in a protocol-specific way.
@@ -190,15 +189,13 @@
}
}
catch (XMLToolingException& ex) {
- if (relayStateOK) {
- // Check for isPassive error condition.
- const char* sc2 = ex.getProperty("statusCode2");
- if (sc2 && !strcmp(sc2, "urn:oasis:names:tc:SAML:2.0:status:NoPassive")) {
- pair<bool,bool> ignore = getBool("ignoreNoPassive", m_configNS.get()); // namespace-qualified if inside handler element
- if (ignore.first && ignore.second && !relayState.empty()) {
- m_log.debug("ignoring SAML status of NoPassive and redirecting to resource...");
- return make_pair(true, httpResponse.sendRedirect(relayState.c_str()));
- }
+ // Check for isPassive error condition.
+ const char* sc2 = ex.getProperty("statusCode2");
+ if (sc2 && !strcmp(sc2, "urn:oasis:names:tc:SAML:2.0:status:NoPassive")) {
+ pair<bool,bool> ignore = getBool("ignoreNoPassive", m_configNS.get()); // namespace-qualified if inside handler element
+ if (ignore.first && ignore.second && !relayState.empty()) {
+ m_log.debug("ignoring SAML status of NoPassive and redirecting to resource...");
+ return make_pair(true, httpResponse.sendRedirect(relayState.c_str()));
}
}
if (!relayState.empty())
@@ -226,8 +223,13 @@
m_log.warn("unable to audit event, log event object was of an incorrect type");
}
}
- catch (std::exception& ex) {
- m_log.warn("exception auditing event: %s", ex.what());
+ catch (std::exception& ex2) {
+ m_log.warn("exception auditing event: %s", ex2.what());
+ }
+
+ // If no sign of annotation, try to annotate it now.
+ if (!ex.getProperty("statusCode")) {
+ annotateException(&ex, policy->getIssuerMetadata(), nullptr, false); // wait to throw it
}
throw;
Modified: branches/REL_2/shibsp/handler/impl/SAML1Consumer.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/handler/impl/SAML1Consumer.cpp?rev=3571&r1=3570&r2=3571&view=diff
==============================================================================
--- branches/REL_2/shibsp/handler/impl/SAML1Consumer.cpp (original)
+++ branches/REL_2/shibsp/handler/impl/SAML1Consumer.cpp Thu Feb 2 22:18:31 2012
@@ -146,7 +146,7 @@
m_log.debug("processing message against SAML 1.x SSO profile");
// Check for errors...this will throw if it's not a successful message.
- checkError(&xmlObject);
+ checkError(&xmlObject, policy.getIssuerMetadata());
// With the binding aspects now moved out to the MessageDecoder,
// the focus here is on the assertion content. For SAML 1.x POST,
More information about the commits
mailing list