[cpp-sp] branch main updated: CPPSP-29 CPPSP-19 Investigate current state of IIS configuration

Rod Widdowson rdw at steadingsoftware.com
Sun Oct 5 13:56:03 UTC 2025


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

rdw 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=c5b88012036e03143dbda34562e08c2b16a89c6d

The following commit(s) were added to refs/heads/main by this push:
     new c5b88012 CPPSP-29 CPPSP-19 Investigate current state of IIS configuration
c5b88012 is described below

commit c5b88012036e03143dbda34562e08c2b16a89c6d
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Sun Oct 5 14:51:35 2025 +0100

    CPPSP-29 CPPSP-19 Investigate current state of IIS configuration
    
    Fix ordering issue in the IIS7 request.
    
    We cannot call getRequestSettings until the host name and site has been set up.
---
 iis7_shib/IIS7Request.cpp | 49 ++++++++++++++++++++++++-----------------------
 1 file changed, 25 insertions(+), 24 deletions(-)

diff --git a/iis7_shib/IIS7Request.cpp b/iis7_shib/IIS7Request.cpp
index 8fa6611d..27ea26bd 100644
--- a/iis7_shib/IIS7Request.cpp
+++ b/iis7_shib/IIS7Request.cpp
@@ -58,30 +58,6 @@ IIS7Request::IIS7Request(IHttpContext *pHttpContext, IHttpEventProvider *pEventP
         throwError("Get Server Secure", hr);
     }
 
-    // Check for header/variable settings in RequestMap and only if absent fall back to Site info.
-    const PropertySet* mappedProperties = getRequestSettings().first;
-    if (mappedProperties->hasProperty(RequestMapper::USE_HEADERS_PROP_NAME)) {
-        m_useHeaders = mappedProperties->getBool(
-            RequestMapper::USE_HEADERS_PROP_NAME, RequestMapper::USE_HEADERS_PROP_DEFAULT);
-    }
-    else {
-        m_useHeaders = site.getBool(RequestMapper::USE_HEADERS_PROP_NAME, RequestMapper::USE_HEADERS_PROP_DEFAULT);
-    }
-
-    if (mappedProperties->hasProperty(RequestMapper::USE_VARIABLES_PROP_NAME)) {
-        m_useVariables = mappedProperties->getBool(
-            RequestMapper::USE_VARIABLES_PROP_NAME, RequestMapper::USE_VARIABLES_PROP_DEFAULT);
-    }
-    else {
-        m_useVariables = site.getBool(RequestMapper::USE_VARIABLES_PROP_NAME, RequestMapper::USE_VARIABLES_PROP_DEFAULT);
-    }
-
-    // This default matches the previous setting.
-    m_safeHeaderNames = site.getBool(ModuleConfig::SAFE_HEADER_NAMES_PROP_NAME, m_useHeaders);
-
-    string prop(site.getString(ModuleConfig::ROLE_ATTRIBUTES_PROP_NAME, ""));
-    split_to_container(m_roleAttributeNames, prop.c_str());
-
     bool normalizeRequest = site.getBool(
         ModuleConfig::NORMALIZE_REQUEST_PROP_NAME, ModuleConfig::NORMALIZE_REQUEST_PROP_DEFAULT);
     unsigned int site_port = site.getUnsignedInt(ModuleConfig::SITE_PORT_PROP_NAME, 0);
@@ -135,6 +111,31 @@ IIS7Request::IIS7Request(IHttpContext *pHttpContext, IHttpEventProvider *pEventP
         m_hostname = site_name;
     }
 
+
+    // Check for header/variable settings in RequestMap and only if absent fall back to Site info.
+    const PropertySet* mappedProperties = getRequestSettings().first;
+    if (mappedProperties->hasProperty(RequestMapper::USE_HEADERS_PROP_NAME)) {
+        m_useHeaders = mappedProperties->getBool(
+            RequestMapper::USE_HEADERS_PROP_NAME, RequestMapper::USE_HEADERS_PROP_DEFAULT);
+    }
+    else {
+        m_useHeaders = site.getBool(RequestMapper::USE_HEADERS_PROP_NAME, RequestMapper::USE_HEADERS_PROP_DEFAULT);
+    }
+
+    if (mappedProperties->hasProperty(RequestMapper::USE_VARIABLES_PROP_NAME)) {
+        m_useVariables = mappedProperties->getBool(
+            RequestMapper::USE_VARIABLES_PROP_NAME, RequestMapper::USE_VARIABLES_PROP_DEFAULT);
+    }
+    else {
+        m_useVariables = site.getBool(RequestMapper::USE_VARIABLES_PROP_NAME, RequestMapper::USE_VARIABLES_PROP_DEFAULT);
+    }
+
+    // This default matches the previous setting.
+    m_safeHeaderNames = site.getBool(ModuleConfig::SAFE_HEADER_NAMES_PROP_NAME, m_useHeaders);
+
+    string prop(site.getString(ModuleConfig::ROLE_ATTRIBUTES_PROP_NAME, ""));
+    split_to_container(m_roleAttributeNames, prop.c_str());
+
     hr = m_ctx->GetServerVariable("REMOTE_USER", &var, &len);
     if (SUCCEEDED(hr)) {
         m_remoteUser = len ? var : "";

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


More information about the commits mailing list