[cpp-sp] branch main updated: Support for useHeaders/Variables via RequestMap.
Scott Cantor
cantor.2 at osu.edu
Wed Jul 23 23:04:26 UTC 2025
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=685479cf03e1548954b1ed44fa6587c34619bb8b
The following commit(s) were added to refs/heads/main by this push:
new 685479cf Support for useHeaders/Variables via RequestMap.
685479cf is described below
commit 685479cf03e1548954b1ed44fa6587c34619bb8b
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Jul 23 19:04:22 2025 -0400
Support for useHeaders/Variables via RequestMap.
---
iis7_shib/IIS7Request.cpp | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/iis7_shib/IIS7Request.cpp b/iis7_shib/IIS7Request.cpp
index 8ab26353..28c988a1 100644
--- a/iis7_shib/IIS7Request.cpp
+++ b/iis7_shib/IIS7Request.cpp
@@ -64,15 +64,32 @@ IIS7Request::IIS7Request(IHttpContext *pHttpContext, IHttpEventProvider *pEventP
throwError("Get Server Secure", hr);
}
- m_useHeaders = site.getBool(ModuleConfig::USE_HEADERS_PROP_NAME, ModuleConfig::USE_HEADERS_PROP_DEFAULT);
+ // Check for header/variable settings in RequestMap and only if absent fall back to Site info.
+ const PropertySet* mapopedProperties = 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(ModuleConfig::USE_HEADERS_PROP_NAME, ModuleConfig::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(ModuleConfig::USE_VARIABLES_PROP_NAME, ModuleConfig::USE_VARIABLES_PROP_DEFAULT);
+ }
+
// This default matches the previous setting.
m_safeHeaderNames = site.getBool(ModuleConfig::SAFE_HEADER_NAMES_PROP_NAME, m_useHeaders);
- m_useVariables = site.getBool(ModuleConfig::USE_VARIABLES_PROP_NAME, ModuleConfig::USE_VARIABLES_PROP_DEFAULT);
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, true);
+ 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);
unsigned int site_sslport = site.getUnsignedInt(ModuleConfig::SITE_SSLPORT_PROP_NAME, 0);
const char* site_name = site.getString(ModuleConfig::SITE_NAME_PROP_NAME, "");
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list