From c8aad528a40ef4200b44ebead0c0ed151e0b9382 Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Thu, 29 Jan 2015 00:38:06 +0000 Subject: [PATCH] https://issues.shibboleth.net/jira/browse/SSPCPP-630 --- shibsp/handler/impl/SAML2LogoutInitiator.cpp | 3 ++- shibsp/handler/impl/SAML2SessionInitiator.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/shibsp/handler/impl/SAML2LogoutInitiator.cpp b/shibsp/handler/impl/SAML2LogoutInitiator.cpp index 83a7a02..a9cc01e 100644 --- a/shibsp/handler/impl/SAML2LogoutInitiator.cpp +++ b/shibsp/handler/impl/SAML2LogoutInitiator.cpp @@ -335,7 +335,8 @@ pair SAML2LogoutInitiator::doRequest( const MessageEncoder* encoder = nullptr; for (vector::const_iterator b = m_bindings.begin(); b != m_bindings.end(); ++b) { auto_ptr_XMLCh wideb(b->c_str()); - if (ep = EndpointManager(role->getSingleLogoutServices()).getByBinding(wideb.get())) { + ep = EndpointManager(role->getSingleLogoutServices()).getByBinding(wideb.get()); + if (ep) { map< string,boost::shared_ptr >::const_iterator enc = m_encoders.find(*b); if (enc != m_encoders.end()) encoder = enc->second.get(); diff --git a/shibsp/handler/impl/SAML2SessionInitiator.cpp b/shibsp/handler/impl/SAML2SessionInitiator.cpp index d4265c3..794bf2f 100644 --- a/shibsp/handler/impl/SAML2SessionInitiator.cpp +++ b/shibsp/handler/impl/SAML2SessionInitiator.cpp @@ -600,10 +600,12 @@ pair SAML2SessionInitiator::doRequest( role = dynamic_cast(entity.second); for (vector::const_iterator b = m_bindings.begin(); b != m_bindings.end(); ++b) { auto_ptr_XMLCh wideb(b->c_str()); - if (ep=EndpointManager(role->getSingleSignOnServices()).getByBinding(wideb.get())) { + ep = EndpointManager(role->getSingleSignOnServices()).getByBinding(wideb.get()); + if (ep) { map< string,boost::shared_ptr >::const_iterator enc = m_encoders.find(*b); - if (enc != m_encoders.end()) + if (enc != m_encoders.end()) { encoder = enc->second.get(); + } break; } } -- 2.1.4