Skip warning when acsIndex not used.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Mon, 16 Aug 2010 20:40:36 +0000 (20:40 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Mon, 16 Aug 2010 20:40:36 +0000 (20:40 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/branches/REL_2@3294 cb58f699-b61c-0410-a6fe-9272a202ed29

adfs/adfs.cpp
shibsp/handler/impl/SAML2SessionInitiator.cpp
shibsp/handler/impl/Shib1SessionInitiator.cpp
shibsp/handler/impl/WAYFSessionInitiator.cpp

index cac8e85..156cdb1 100644 (file)
@@ -376,7 +376,8 @@ pair<bool,long> ADFSSessionInitiator::run(SPRequest& request, string& entityID,
 
     // Validate the ACS for use with this protocol.
     if (!ACS || !XMLString::equals(getProtocolFamily(), ACS->getProtocolFamily())) {
-        request.log(SPRequest::SPWarn, "invalid acsIndex property, or non-ADFS ACS, using default ADFS ACS");
+        if (ACS)
+            request.log(SPRequest::SPWarn, "invalid acsIndex property, or non-ADFS ACS, using default ADFS ACS");
         ACS = app.getAssertionConsumerServiceByProtocol(getProtocolFamily());
         if (!ACS)
             throw ConfigurationException("Unable to locate an ADFS-compatible ACS in the configuration.");
index 3d903f3..f44dca2 100644 (file)
@@ -324,7 +324,8 @@ pair<bool,long> SAML2SessionInitiator::run(SPRequest& request, string& entityID,
 
     // If we picked by index, validate the ACS for use with this protocol.
     if (!ECP && (!ACS || !XMLString::equals(getProtocolFamily(), ACS->getProtocolFamily()))) {
-        request.log(SPRequest::SPWarn, "invalid acsIndex property, or non-SAML 2.0 ACS, using default SAML 2.0 ACS");
+        if (ACS)
+            request.log(SPRequest::SPWarn, "invalid acsIndex property, or non-SAML 2.0 ACS, using default SAML 2.0 ACS");
         ACS = app.getAssertionConsumerServiceByProtocol(getProtocolFamily());
         if (!ACS)
             throw ConfigurationException("Unable to locate a SAML 2.0 ACS endpoint to use for response.");
index 6242c66..d3000ca 100644 (file)
@@ -158,7 +158,8 @@ pair<bool,long> Shib1SessionInitiator::run(SPRequest& request, string& entityID,
 
     // If we picked by index, validate the ACS for use with this protocol.
     if (!ACS || !XMLString::equals(getProtocolFamily(), ACS->getProtocolFamily())) {
-        request.log(SPRequest::SPWarn, "invalid acsIndex property, or non-SAML 1.x ACS, using default SAML 1.x ACS");
+        if (ACS)
+            request.log(SPRequest::SPWarn, "invalid acsIndex property, or non-SAML 1.x ACS, using default SAML 1.x ACS");
         ACS = app.getAssertionConsumerServiceByProtocol(getProtocolFamily());
         if (!ACS)
             throw ConfigurationException("Unable to locate a SAML 1.x ACS endpoint to use for response.");
index 2947663..459518b 100644 (file)
@@ -131,7 +131,8 @@ pair<bool,long> WAYFSessionInitiator::run(SPRequest& request, string& entityID,
 
     // If we picked by index, validate the ACS for use with this protocol.
     if (!ACS || !XMLString::equals(samlconstants::SAML11_PROTOCOL_ENUM, ACS->getProtocolFamily())) {
-        request.log(SPRequest::SPWarn, "invalid acsIndex property, or non-SAML 1.x ACS, using default SAML 1.x ACS");
+        if (ACS)
+            request.log(SPRequest::SPWarn, "invalid acsIndex property, or non-SAML 1.x ACS, using default SAML 1.x ACS");
         ACS = app.getAssertionConsumerServiceByProtocol(getProtocolFamily());
         if (!ACS)
             throw ConfigurationException("Unable to locate a SAML 1.x ACS endpoint to use for response.");