[cpp-sp] branch main updated: Implement straw man hasProperty method.
Scott Cantor
cantor.2 at osu.edu
Tue Jul 1 20:30:56 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=354103992069bd96e8d2cab6fe5299ce78eb0946
The following commit(s) were added to refs/heads/main by this push:
new 35410399 Implement straw man hasProperty method.
35410399 is described below
commit 354103992069bd96e8d2cab6fe5299ce78eb0946
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jul 1 16:30:53 2025 -0400
Implement straw man hasProperty method.
---
apache/mod_shib_24.cpp | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/apache/mod_shib_24.cpp b/apache/mod_shib_24.cpp
index 5658eeeb..9b76e841 100644
--- a/apache/mod_shib_24.cpp
+++ b/apache/mod_shib_24.cpp
@@ -1023,8 +1023,20 @@ RequestMapper::Settings ApacheRequestMapper::getSettings(const HTTPRequest& requ
bool ApacheRequestMapper::hasProperty(const char* name) const
{
- if (m_sta) {
- // TODO, will need to enumerate all the built-in properties I imagine.
+ if (m_sta && name) {
+ // Override Apache-settable string properties.
+ if (!strcmp(name,"authType")) {
+ return ap_auth_type(m_sta->m_req) != nullptr;
+ }
+ else if (!strcmp(name,"applicationId"))
+ return m_sta->m_dc->szApplicationId != nullptr;
+ else if (!strcmp(name,"requireSessionWith"))
+ return m_sta->m_dc->szRequireWith != nullptr;
+ else if (!strcmp(name,"redirectToSSL"))
+ return m_sta->m_dc->szRedirectToSSL != nullptr;
+ else if (m_sta->m_dc->tSettings) {
+ return apr_table_get(m_sta->m_dc->tSettings, name) != nullptr;
+ }
}
return m_props && (!m_sta->m_dc->tUnsettings || !apr_table_get(m_sta->m_dc->tUnsettings, name))
@@ -1033,9 +1045,9 @@ bool ApacheRequestMapper::hasProperty(const char* name) const
bool ApacheRequestMapper::getBool(const char* name, bool defaultValue) const
{
- if (m_sta) {
+ if (m_sta && name) {
// Override Apache-settable boolean properties.
- if (name && !strcmp(name,"requireSession") && m_sta->m_dc->bRequireSession != -1)
+ if (!strcmp(name,"requireSession") && m_sta->m_dc->bRequireSession != -1)
return m_sta->m_dc->bRequireSession == 1;
else if (m_sta->m_dc->tSettings) {
const char* prop = apr_table_get(m_sta->m_dc->tSettings, name);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list