[cpp-sp] branch main updated: SSPCPP-886 - Access discoveryURL via RequestMap within handlers

Scott Cantor cantor.2 at osu.edu
Tue Dec 1 21:38:56 UTC 2020


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository cpp-sp.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=3728fd49d6dec5ca54e1b2aa940a008f802ae108

The following commit(s) were added to refs/heads/main by this push:
       new  3728fd49  SSPCPP-886 - Access discoveryURL via RequestMap within handlers
3728fd49 is described below

commit 3728fd49d6dec5ca54e1b2aa940a008f802ae108
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Dec 1 16:38:23 2020 -0500

    SSPCPP-886 - Access discoveryURL via RequestMap within handlers
    
    https://issues.shibboleth.net/jira/browse/SSPCPP-886
---
 shibsp/handler/impl/SAMLDSSessionInitiator.cpp |  2 +-
 shibsp/handler/impl/WAYFSessionInitiator.cpp   | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/shibsp/handler/impl/SAMLDSSessionInitiator.cpp b/shibsp/handler/impl/SAMLDSSessionInitiator.cpp
index 34fcb8f4..fdbb1c0b 100644
--- a/shibsp/handler/impl/SAMLDSSessionInitiator.cpp
+++ b/shibsp/handler/impl/SAMLDSSessionInitiator.cpp
@@ -182,7 +182,7 @@ pair<bool,long> SAMLDSSessionInitiator::run(SPRequest& request, string& entityID
         pair<bool,bool> passopt = getBool("isPassive", request);
         isPassive = passopt.first && passopt.second;
 
-        discoveryURL = getString("discoveryURL");
+        discoveryURL = getString("discoveryURL", request, HANDLER_PROPERTY_MAP);
     }
     else {
         // Check for a hardwired target value in the map or handler.
diff --git a/shibsp/handler/impl/WAYFSessionInitiator.cpp b/shibsp/handler/impl/WAYFSessionInitiator.cpp
index 83f7a094..d6352acf 100644
--- a/shibsp/handler/impl/WAYFSessionInitiator.cpp
+++ b/shibsp/handler/impl/WAYFSessionInitiator.cpp
@@ -118,7 +118,7 @@ pair<bool,long> WAYFSessionInitiator::run(SPRequest& request, string& entityID,
         recoverRelayState(request.getApplication(), request, request, target, false);
         request.getApplication().limitRedirect(request, target.c_str());
 
-        discoveryURL = getString("discoveryURL");
+        discoveryURL = getString("discoveryURL", request, HANDLER_PROPERTY_MAP);
     }
     else {
         // Check for a hardwired target value in the map or handler.
@@ -130,7 +130,11 @@ pair<bool,long> WAYFSessionInitiator::run(SPRequest& request, string& entityID,
 
         discoveryURL = request.getRequestSettings().first->getString("discoveryURL");
     }
-    
+
+    if (!discoveryURL.first)
+        discoveryURL.second = m_url;
+    m_log.debug("sending request to WAYF (%s)", discoveryURL.second);
+
     if (!ACS) {
         // Try fixed index property.
         pair<bool,unsigned int> index = getUnsignedInt("acsIndex", request, HANDLER_PROPERTY_MAP|HANDLER_PROPERTY_FIXED);
@@ -147,10 +151,6 @@ pair<bool,long> WAYFSessionInitiator::run(SPRequest& request, string& entityID,
             throw ConfigurationException("Unable to locate a SAML 1.x ACS endpoint to use for response.");
     }
 
-    if (!discoveryURL.first)
-        discoveryURL.second = m_url;
-    m_log.debug("sending request to WAYF (%s)", discoveryURL.second);
-
     // Since we're not passing by index, we need to fully compute the return URL.
     // Compute the ACS URL. We add the ACS location to the base handlerURL.
     string ACSloc = request.getHandlerURL(target.c_str());

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list