X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=shibsp%2Fhandler%2Fimpl%2FShib1SessionInitiator.cpp;h=21a1703901d3c8b65799189bc68b4681bf200fd9;hb=8d742a1e1f479f74eafd6f60e21c5f9f329a924b;hp=d210ff4124b3479dcbfbcea4e43692e40c5d3056;hpb=a8928d2b5c8101a9a90da022d6743c3d2a368e9e;p=shibboleth%2Fcpp-sp.git diff --git a/shibsp/handler/impl/Shib1SessionInitiator.cpp b/shibsp/handler/impl/Shib1SessionInitiator.cpp index d210ff4..21a1703 100644 --- a/shibsp/handler/impl/Shib1SessionInitiator.cpp +++ b/shibsp/handler/impl/Shib1SessionInitiator.cpp @@ -72,6 +72,10 @@ namespace shibsp { pair unwrap(SPRequest& request, DDF& out) const; pair run(SPRequest& request, string& entityID, bool isHandler=true) const; + const XMLCh* getProtocolFamily() const { + return samlconstants::SAML11_PROTOCOL_ENUM; + } + private: pair doRequest( const Application& application, @@ -158,18 +162,9 @@ pair Shib1SessionInitiator::run(SPRequest& request, string& entityID, } // Validate the ACS for use with this protocol. - pair ACSbinding = ACS ? ACS->getString("Binding") : pair(false,nullptr); - if (ACSbinding.first) { - pair compatibleBindings = getString("compatibleBindings"); - if (compatibleBindings.first && strstr(compatibleBindings.second, ACSbinding.second) == nullptr) { - m_log.error("configured or requested ACS has non-SAML 1.x binding"); - throw ConfigurationException("Configured or requested ACS has non-SAML 1.x binding ($1).", params(1, ACSbinding.second)); - } - else if (strcmp(ACSbinding.second, samlconstants::SAML1_PROFILE_BROWSER_POST) && - strcmp(ACSbinding.second, samlconstants::SAML1_PROFILE_BROWSER_ARTIFACT)) { - m_log.error("configured or requested ACS has non-SAML 1.x binding"); - throw ConfigurationException("Configured or requested ACS has non-SAML 1.x binding ($1).", params(1, ACSbinding.second)); - } + if (ACS && !XMLString::equals(getProtocolFamily(), ACS->getProtocolFamily())) { + m_log.error("configured or requested ACS has non-SAML 1.x binding"); + throw ConfigurationException("Configured or requested ACS has non-SAML 1.x binding ($1).", params(1, ACS->getString("Binding").second)); } // Compute the ACS URL. We add the ACS location to the base handlerURL.