[cpp-sp] branch main updated: Rework policy handling around session lookups.

Codeberg noreply at shibboleth.net
Wed Sep 16 19:17:01 UTC 2026


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

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

View the commit online:
https://codeberg.org/Shibboleth/cpp-sp/commit/69b570e3daf80241af608cbb975b01e550bef4da

The following commit(s) were added to refs/heads/main by this push:
     new 69b570e3 Rework policy handling around session lookups.
69b570e3 is described below

commit 69b570e3daf80241af608cbb975b01e550bef4da
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Wed Sep 16 15:16:46 2026 -0400

    Rework policy handling around session lookups.
---
 apache/mod_shib4.cpp                               |  8 +--
 shibsp/AbstractSPRequest.cpp                       |  4 +-
 shibsp/AbstractSPRequest.h                         |  3 +-
 shibsp/Agent.cpp                                   |  4 +-
 shibsp/SPRequest.h                                 |  9 ++-
 shibsp/handler/impl/LogoutConsumer.cpp             |  2 +-
 shibsp/handler/impl/LogoutInitiator.cpp            |  2 +-
 shibsp/session/AbstractSessionCache.h              |  6 +-
 shibsp/session/SessionCache.h                      |  5 +-
 shibsp/session/SessionCacheSPI.h                   |  8 +--
 shibsp/session/impl/AbstractSessionCache.cpp       | 64 +++++++++++-----------
 shibsp/session/impl/FilesystemSessionCache.cpp     |  4 +-
 shibsp/session/impl/MemorySessionCache.cpp         |  7 ++-
 tests/session/impl/FilesystemSessionCacheTests.cpp | 10 ++--
 tests/session/impl/MemorySessionCacheTests.cpp     | 10 ++--
 15 files changed, 76 insertions(+), 70 deletions(-)

diff --git a/apache/mod_shib4.cpp b/apache/mod_shib4.cpp
index 2373f282..7bdb1fb5 100644
--- a/apache/mod_shib4.cpp
+++ b/apache/mod_shib4.cpp
@@ -1055,7 +1055,7 @@ extern "C" authz_status shib_session_check_authz(request_rec* r, const char*, co
         return sta.second;
 
     try {
-        unique_lock<Session> session = sta.first->getSession(false, true);
+        unique_lock<Session> session = sta.first->getSession(false);
         if (session) {
             sta.first->debug("htaccess: accepting shib-session/valid-user based on active session");
             return AUTHZ_GRANTED;
@@ -1152,7 +1152,7 @@ extern "C" authz_status shib_acclass_check_authz(request_rec* r, const char* req
     const htAccessControl& hta = dynamic_cast<const ApacheRequestMapper*>(sta.first->getRequestSettings().first)->getHTAccessControl();
 
     try {
-        unique_lock<Session> session = sta.first->getSession(false, true);
+        unique_lock<Session> session = sta.first->getSession(false);
         if (session && hta.doShibAttr(*sta.first, session.mutex(),
                 sta.first->getAgent().getString(
                     AttributeConfiguration::LEGACY_CLASSREF_ATTRIBUTE_PROP_NAME,
@@ -1177,7 +1177,7 @@ extern "C" authz_status shib_attr_check_authz(request_rec* r, const char* requir
     const htAccessControl& hta = dynamic_cast<const ApacheRequestMapper*>(sta.first->getRequestSettings().first)->getHTAccessControl();
 
     try {
-        unique_lock<Session> session = sta.first->getSession(false, true);
+        unique_lock<Session> session = sta.first->getSession(false);
         if (session) {
             const char* rule = ap_getword_conf(r->pool, &require_line);
             if (rule && hta.doShibAttr(*sta.first, session.mutex(), rule, require_line) == AccessControl::shib_acl_true)
@@ -1201,7 +1201,7 @@ extern "C" authz_status shib_plugin_check_authz(request_rec* r, const char* requ
     const htAccessControl& hta = dynamic_cast<const ApacheRequestMapper*>(sta.first->getRequestSettings().first)->getHTAccessControl();
 
     try {
-        unique_lock<Session> session = sta.first->getSession(false, true);
+        unique_lock<Session> session = sta.first->getSession(false);
         if (session) {
             const char* config = ap_getword_conf(r->pool, &require_line);
             if (config && hta.doAccessControl(*sta.first, session.mutex(), config) == AccessControl::shib_acl_true)
diff --git a/shibsp/AbstractSPRequest.cpp b/shibsp/AbstractSPRequest.cpp
index 6acf849d..7353847d 100644
--- a/shibsp/AbstractSPRequest.cpp
+++ b/shibsp/AbstractSPRequest.cpp
@@ -100,9 +100,9 @@ bool AbstractSPRequest::isUseVariables() const {
         RequestMapper::USE_VARIABLES_PROP_NAME, RequestMapper::USE_VARIABLES_PROP_DEFAULT);
 }
 
-unique_lock<Session> AbstractSPRequest::getSession(bool checkTimeout, bool ignoreAddress)
+unique_lock<Session> AbstractSPRequest::getSession(bool enforcePolicy)
 {
-    return getAgent().getSessionCache()->find(*this, checkTimeout, ignoreAddress);
+    return getAgent().getSessionCache()->find(*this, enforcePolicy);
 }
 
 void AbstractSPRequest::setRequestURI(const char* uri)
diff --git a/shibsp/AbstractSPRequest.h b/shibsp/AbstractSPRequest.h
index a676b5c8..e3b5e945 100644
--- a/shibsp/AbstractSPRequest.h
+++ b/shibsp/AbstractSPRequest.h
@@ -74,8 +74,7 @@ namespace shibsp {
         RequestMapper::Settings getRequestSettings() const;
         bool isUseHeaders() const;
         bool isUseVariables() const;
-        std::unique_lock<Session> getSession(bool checkTimeout=true, bool ignoreAddress=false);
-        Session* getCachedSession(bool checkTimeout=true, bool ignoreAddress=false);
+        std::unique_lock<Session> getSession(bool enforcePolicy=true);
         const char* getRequestURI() const;
         const char* getRequestURL() const;
         std::string getRemoteAddr() const;
diff --git a/shibsp/Agent.cpp b/shibsp/Agent.cpp
index c6255243..92d68f30 100644
--- a/shibsp/Agent.cpp
+++ b/shibsp/Agent.cpp
@@ -295,7 +295,7 @@ pair<bool,long> Agent::doAuthorization(SPRequest& request) const
         if (settings.second) {
             unique_lock<Session> session;
             try {
-                session = request.getSession(false, true);  // ignore timeout and address check
+                session = request.getSession(false);  // ignore policy checks
             }
             catch (const exception& e) {
                 request.warn("unable to obtain session to pass to access control provider: %s", e.what());
@@ -338,7 +338,7 @@ pair<bool,long> Agent::doExport(SPRequest& request, bool requireSession) const
 
         unique_lock<Session> session;
         try {
-            session = request.getSession(false, true);  // ignore timeout and address check here
+            session = request.getSession(false);  // ignore policy checks
         }
         catch (const exception& e) {
             request.warn("unable to obtain session to export to request: %s", e.what());
diff --git a/shibsp/SPRequest.h b/shibsp/SPRequest.h
index d759897e..beabf4b9 100644
--- a/shibsp/SPRequest.h
+++ b/shibsp/SPRequest.h
@@ -95,17 +95,18 @@ namespace shibsp {
         /**
          * Returns a locked Session associated with the request.
          * 
-         * @param checkTimeout  true iff the last-used timestamp should be updated and any timeout policy enforced
-         * @param ignoreAddress true iff all address checking should be ignored, regardless of policy
+         * @param enforcePolicy  whether to apply session use policy or search best-effort
+         * 
          * @return a locked mutex wrapper around the Session (or an empty wrapper if no Session exists)
          */
-        virtual std::unique_lock<Session> getSession(bool checkTimeout=true, bool ignoreAddress=false)=0;
+        virtual std::unique_lock<Session> getSession(bool enforcePolicy=true)=0;
 
         /**
          * Returns the effective base Handler URL for a resource,
          * or the current request URL.
          *
          * @param resource  resource URL to compute handler for
+         * 
          * @return  base location of handler
          */
         virtual const char* getHandlerURL(const char* resource=nullptr) const=0;
@@ -116,6 +117,7 @@ namespace shibsp {
          * lookups by overriding this method.
          *
          * @param name  the name of the secure header to return
+         * 
          * @return the header's value, or an empty string
          */
         virtual std::string getSecureHeader(const char* name) const=0;
@@ -158,6 +160,7 @@ namespace shibsp {
          * Log exception to native server environment.
          * 
          * @param level logging level
+         * 
          * @param e exception
          */
         virtual void log(Priority::Value level, const std::exception& e) const=0;
diff --git a/shibsp/handler/impl/LogoutConsumer.cpp b/shibsp/handler/impl/LogoutConsumer.cpp
index 4f58164f..cc6b5001 100644
--- a/shibsp/handler/impl/LogoutConsumer.cpp
+++ b/shibsp/handler/impl/LogoutConsumer.cpp
@@ -92,7 +92,7 @@ pair<bool,long> LogoutConsumer::run(SPRequest& request, bool isHandler) const
 
     unique_lock<Session> session;
     try {
-        session = request.getSession(false, true);  // ignore all checks
+        session = request.getSession(false);  // ignore all checks
     }
     catch (const exception& ex) {
         request.error("error accessing current session: %s", ex.what());
diff --git a/shibsp/handler/impl/LogoutInitiator.cpp b/shibsp/handler/impl/LogoutInitiator.cpp
index d891437f..2e079371 100644
--- a/shibsp/handler/impl/LogoutInitiator.cpp
+++ b/shibsp/handler/impl/LogoutInitiator.cpp
@@ -62,7 +62,7 @@ pair<bool,long> LogoutInitiator::run(SPRequest& request, bool isHandler) const
 
     unique_lock<Session> session;
     try {
-        session = request.getSession(false, true);  // ignore all checks
+        session = request.getSession(false);  // ignore all checks
     }
     catch (const exception& ex) {
         request.error("error accessing current session: %s", ex.what());
diff --git a/shibsp/session/AbstractSessionCache.h b/shibsp/session/AbstractSessionCache.h
index e201512a..24539654 100644
--- a/shibsp/session/AbstractSessionCache.h
+++ b/shibsp/session/AbstractSessionCache.h
@@ -126,7 +126,7 @@ namespace shibsp {
 
             // SessionCache API
             std::string create(SPRequest& request, const char* candidateSessionID, DDF& data);
-            std::unique_lock<Session> find(SPRequest& request, bool checkTimeout, bool ignoreAddress);
+            std::unique_lock<Session> find(SPRequest& request, bool enforcePolicy=true);
             std::unique_lock<Session> find(const char* applicationId, const char* key, unsigned int version=1);
             bool update(SPRequest& request, std::unique_lock<Session>& session, DDF& data, const char* reason=nullptr);
             void remove(SPRequest& request);
@@ -214,9 +214,7 @@ namespace shibsp {
                 const char* applicationID,
                 const char* key,
                 unsigned int version,
-                unsigned int lifetime,
-                unsigned int timeout,
-                const char* client_addr
+                bool enforcePolicy
                 );
 
             Category& m_log;
diff --git a/shibsp/session/SessionCache.h b/shibsp/session/SessionCache.h
index 7a04d5ef..0bb07a4c 100644
--- a/shibsp/session/SessionCache.h
+++ b/shibsp/session/SessionCache.h
@@ -169,12 +169,11 @@ namespace shibsp {
          * can be used to "clear" the session from subsequent client requests, then it may be cleared.</p>
          *
          * @param request       request from client
-         * @param checkTimeout  true iff the timeout policy should be enforced before returning session
-         * @param ignoreAddress true iff address checking should be ignored, regardless of request's policy
+         * @param enforcePolicy true iff the various policies governing use of a session should be enforced
          * 
          * @return locked Session (or an unbound wrapper)
          */
-        virtual std::unique_lock<Session> find(SPRequest& request, bool checkTimeout, bool ignoreAddress)=0;
+        virtual std::unique_lock<Session> find(SPRequest& request, bool enforcePolicy=true)=0;
 
         /**
          * Locates an existing session by its key/ID and version.
diff --git a/shibsp/session/SessionCacheSPI.h b/shibsp/session/SessionCacheSPI.h
index 83de8eca..2c99a473 100644
--- a/shibsp/session/SessionCacheSPI.h
+++ b/shibsp/session/SessionCacheSPI.h
@@ -75,10 +75,10 @@ namespace shibsp {
          * sorts on the session prior to returning it. An invalid session MUST NOT be returned
          * to the caller.</p>
          * 
-         * <p>To the extent possible, the implementation SHOULD ensure that the underlying
-         * storage of the session (if returned) is updated such that subsequent calls to this
-         * method will be actioned based on a time of last use that is no older than the current
-         * time.</p>
+         * <p>To the extent possible, if the request parameter exists, the implementation SHOULD
+         * ensure that the underlying storage of the session (if returned) is updated such that
+         * subsequent calls to this method will be actioned based on a time of last use that is
+         * no older than the current time.</p>
          * 
          * <p>The returned session MAY be of a newer version than requested but will not be older.</p>
          * 
diff --git a/shibsp/session/impl/AbstractSessionCache.cpp b/shibsp/session/impl/AbstractSessionCache.cpp
index 1634b7a3..f19c8980 100644
--- a/shibsp/session/impl/AbstractSessionCache.cpp
+++ b/shibsp/session/impl/AbstractSessionCache.cpp
@@ -409,9 +409,9 @@ string AbstractSessionCache::create(SPRequest& request, const char* candidateSes
     return key;
 }
 
-unique_lock<Session> AbstractSessionCache::find(SPRequest& request, bool checkTimeout, bool ignoreAddress)
+unique_lock<Session> AbstractSessionCache::find(SPRequest& request, bool enforcePolicy)
 {
-    // Validation here depends on request content settings plus the input flags. The resulting policy
+    // Validation here depends on request content settings plus the input flag. The resulting policy
     // is passed to the _find method for enforcement.
 
     const char* cookieval = m_cookieManager->getCookieValue(request);
@@ -421,28 +421,10 @@ unique_lock<Session> AbstractSessionCache::find(SPRequest& request, bool checkTi
     }
 
     const auto& settings = request.getRequestSettings().first;
-
     const char* applicationId = settings->getString(RequestMapper::APPLICATION_ID_PROP_NAME, RequestMapper::APPLICATION_ID_PROP_DEFAULT);
-    unsigned int lifetime = settings->getUnsignedInt(RequestMapper::LIFETIME_PROP_NAME, RequestMapper::LIFETIME_PROP_DEFAULT);
-    unsigned int timeout = 0;
-    if (checkTimeout) {
-        timeout = settings->getUnsignedInt(RequestMapper::TIMEOUT_PROP_NAME, RequestMapper::TIMEOUT_PROP_DEFAULT);
-    }
-    string client_addr;
-    if (!ignoreAddress && settings->getBool(RequestMapper::CONSISTENT_ADDRESS_PROP_NAME, RequestMapper::CONSISTENT_ADDRESS_PROP_DEFAULT)) {
-        client_addr = request.getRemoteAddr();
-    }
-
     pair<string,unsigned int> keyver = parseCookieValue(cookieval);
 
-    unique_lock<Session> session = _find(
-        &request,
-        applicationId,
-        keyver.first.c_str(),
-        keyver.second,
-        lifetime,
-        timeout,
-        client_addr.empty() ? nullptr : client_addr.c_str());
+    unique_lock<Session> session = _find(&request, applicationId, keyver.first.c_str(), keyver.second, enforcePolicy);
     if (!session) {
         // No session, we need to clear the session cookie to prevent further use.
         request.debug("clearing cookie for session (%s)", keyver.first.c_str());
@@ -461,7 +443,7 @@ unique_lock<Session> AbstractSessionCache::find(const char* applicationId, const
 {
     // This variant does no request-based validation so it returns the session best effort
     // using the underlying _find method. It does ensure the applicationId matches if set.
-    return _find(nullptr, applicationId, key, version, 0, 0, nullptr);
+    return _find(nullptr, applicationId, key, version, false);
 }
 
 unique_lock<Session> AbstractSessionCache::_find(
@@ -469,12 +451,28 @@ unique_lock<Session> AbstractSessionCache::_find(
     const char* applicationId,
     const char* key,
     unsigned int version,
-    unsigned int lifetime,
-    unsigned int timeout,
-    const char* client_addr
+    bool enforcePolicy
     )
 {
     log(DEBUG_MARK, "searching local cache for session (%s)", key);
+
+    unsigned int lifetime = 0;
+    unsigned int timeout = 0;
+    string client_address;
+    if (enforcePolicy) {
+        if (request) {
+            const auto& settings = request->getRequestSettings().first;
+            lifetime = settings->getUnsignedInt(RequestMapper::LIFETIME_PROP_NAME, RequestMapper::LIFETIME_PROP_DEFAULT);
+            timeout = settings->getUnsignedInt(RequestMapper::TIMEOUT_PROP_NAME, RequestMapper::TIMEOUT_PROP_DEFAULT);
+            if (settings->getBool(RequestMapper::CONSISTENT_ADDRESS_PROP_NAME, RequestMapper::CONSISTENT_ADDRESS_PROP_DEFAULT)) {
+                client_address = request->getRemoteAddr();
+            }
+        }
+        else {
+            log(CRIT_MARK, "_find method invoked with null SPRequest but enforcePolicy set?");
+        }
+    }
+
 #ifdef _DEBUG
     log(DEBUG_MARK, "_find locking cache to locate session (%s)", key);
 #endif
@@ -519,7 +517,7 @@ unique_lock<Session> AbstractSessionCache::_find(
             dormant(request, key);
             // We want to fall into the cache_read step below to reload the latest version.
         }
-        else if (!dynamic_cast<BasicSession*>(session.mutex())->isValid(request, lifetime, timeout)) {
+        else if (enforcePolicy && !dynamic_cast<BasicSession*>(session.mutex())->isValid(request, lifetime, timeout)) {
             // Locally invalid on its face, so remove and return nothing.
             session.unlock();
             log(DEBUG_MARK, "session (%s) invalid, removing it", key);
@@ -527,13 +525,14 @@ unique_lock<Session> AbstractSessionCache::_find(
             dormant(request, key);
             return session;
         }
-        else if (client_addr) {
+        else if (!client_address.empty()) {
             // Check client address.
-            const char* family = AbstractSessionCache::getAddressFamily(client_addr);
+            const char* family = AbstractSessionCache::getAddressFamily(client_address.c_str());
             const char* bound_addr = dynamic_cast<BasicSession*>(session.mutex())->getClientAddress(family);
             if (bound_addr) {
-                if (!isAddressMatch(client_addr, bound_addr)) {
-                    log(WARN_MARK, "session (%s) access invalid, bound to (%s), accessed from (%s)", key, bound_addr, client_addr);
+                if (!isAddressMatch(client_address.c_str(), bound_addr)) {
+                    log(WARN_MARK, "session (%s) access invalid, bound to (%s), accessed from (%s)", key, bound_addr,
+                        client_address.c_str());
                     session.unlock();
                 }
                 // Return locked session or empty wrapper depending on the check result.
@@ -542,7 +541,8 @@ unique_lock<Session> AbstractSessionCache::_find(
             else {
                 // We need to rebind the session and the cleanest way to do so is to leverage the
                 // back-end's cache_read operation from scratch to refresh the session.
-                log(DEBUG_MARK, "session (%s) is unbound to address family (%s), removing session for update/reload", key, family);
+                log(DEBUG_MARK, "session (%s) is unbound to address family (%s), removing session for update/reload",
+                    key, family);
                 // We need to dump the local copy so we can recurse back in to load in the "later" version.
                 session.unlock();   // need to unlock for dormant() to work
                 dormant(request, key);
@@ -566,7 +566,7 @@ unique_lock<Session> AbstractSessionCache::_find(
     DDF obj;
     try {
         // Note this performs the relevant enforcement for us.
-        obj = cache_read(request, applicationId, key, version, lifetime, timeout, client_addr);
+        obj = cache_read(request, applicationId, key, version, lifetime, timeout, client_address.c_str());
         if (obj.isnull()) {
             log(DEBUG_MARK, "session (%s) not available in persistent store", key);
             return unique_lock<Session>();
diff --git a/shibsp/session/impl/FilesystemSessionCache.cpp b/shibsp/session/impl/FilesystemSessionCache.cpp
index cd334657..e3f6e79a 100644
--- a/shibsp/session/impl/FilesystemSessionCache.cpp
+++ b/shibsp/session/impl/FilesystemSessionCache.cpp
@@ -350,7 +350,9 @@ DDF FilesystemSessionCache::cache_read(
         }
     }
 
-    bool updateTimestamp = true;
+    // The last access timestamp should not be updated if the request is null, meaning
+    // the session is being accessed by its key and not as the "active" session.
+    bool updateTimestamp = request != nullptr;
 
     if (client_addr) {
         const char* family = getAddressFamily(client_addr);
diff --git a/shibsp/session/impl/MemorySessionCache.cpp b/shibsp/session/impl/MemorySessionCache.cpp
index 2ba365eb..72d73638 100644
--- a/shibsp/session/impl/MemorySessionCache.cpp
+++ b/shibsp/session/impl/MemorySessionCache.cpp
@@ -246,7 +246,12 @@ DDF MemorySessionCache::cache_read(
         }
     }
 
-    entry->second.second = now;
+    // The last access timestamp should not be updated if the request is null, meaning
+    // the session is being accessed by its key and not as the "active" session.
+    if (request) {
+        entry->second.second = now;
+    }
+    
     return entry->second.first.copy();
 }
 
diff --git a/tests/session/impl/FilesystemSessionCacheTests.cpp b/tests/session/impl/FilesystemSessionCacheTests.cpp
index 0c74456f..203d041e 100644
--- a/tests/session/impl/FilesystemSessionCacheTests.cpp
+++ b/tests/session/impl/FilesystemSessionCacheTests.cpp
@@ -146,7 +146,7 @@ BOOST_FIXTURE_TEST_CASE(FilessystemSessionCache_notonorafter, FilesystemFixture)
     cookie = cookie + '=' + key + ".1";
     request.m_requestHeaders["Cookie"] = cookie;
 
-    unique_lock<Session> session = cache->find(request, true, false);
+    unique_lock<Session> session = cache->find(request);
     BOOST_CHECK(!session);
 }
 
@@ -191,7 +191,7 @@ BOOST_FIXTURE_TEST_CASE(FilesystemSessionCache_tests, FilesystemFixture)
     cookie = cookie + '=' + key + ".1";
     request.m_requestHeaders["Cookie"] = cookie;
 
-    unique_lock<Session> session = cache->find(request, true, false);
+    unique_lock<Session> session = cache->find(request);
     BOOST_CHECK(session);
     if (session) {
         session.unlock();
@@ -203,7 +203,7 @@ BOOST_FIXTURE_TEST_CASE(FilesystemSessionCache_tests, FilesystemFixture)
     // Force an address re-bind, which should revise the session version.
     request.m_addr = "::1";
 
-    session = cache->find(request, true, false);
+    session = cache->find(request);
     BOOST_CHECK(session);
     if (session) {
         BOOST_CHECK_EQUAL(session.mutex()->getVersion(), 2);
@@ -247,7 +247,7 @@ BOOST_FIXTURE_TEST_CASE(FilesystemSessionCache_testUpdate, FilesystemFixture)
     cookie = cookie + '=' + key + ".1";
     request.m_requestHeaders["Cookie"] = cookie;
 
-    unique_lock<Session> session = cache->find(request, true, false);
+    unique_lock<Session> session = cache->find(request);
     BOOST_CHECK(session);
 
     // Clear old response headers.
@@ -272,7 +272,7 @@ BOOST_FIXTURE_TEST_CASE(FilesystemSessionCache_testUpdate, FilesystemFixture)
         session.unlock();
     }
 
-    session = cache->find(request, true, false);
+    session = cache->find(request);
     BOOST_CHECK(session);
     if (session) {
         BOOST_CHECK_EQUAL(session.mutex()->getVersion(), 2);
diff --git a/tests/session/impl/MemorySessionCacheTests.cpp b/tests/session/impl/MemorySessionCacheTests.cpp
index 55c4bbdb..a75a1620 100644
--- a/tests/session/impl/MemorySessionCacheTests.cpp
+++ b/tests/session/impl/MemorySessionCacheTests.cpp
@@ -105,7 +105,7 @@ BOOST_FIXTURE_TEST_CASE(MemorySessionCache_notonorafter, MemoryFixture)
     cookie = cookie + '=' + key + ".1";
     request.m_requestHeaders["Cookie"] = cookie;
 
-    unique_lock<Session> session = cache->find(request, true, false);
+    unique_lock<Session> session = cache->find(request);
     BOOST_CHECK(!session);
 }
 
@@ -136,7 +136,7 @@ BOOST_FIXTURE_TEST_CASE(MemorySessionCache_tests, MemoryFixture)
     cookie = cookie + '=' + key + ".1";
     request.m_requestHeaders["Cookie"] = cookie;
 
-    unique_lock<Session> session = cache->find(request, true, false);
+    unique_lock<Session> session = cache->find(request);
     BOOST_CHECK(session);
     if (session) {
         const DDF& attr = session.mutex()->getAttributes().at("Shib-Authentication-Instant");
@@ -152,7 +152,7 @@ BOOST_FIXTURE_TEST_CASE(MemorySessionCache_tests, MemoryFixture)
     // Force an address re-bind, which should revise the session version.
     request.m_addr = "::1";
 
-    session = cache->find(request, true, false);
+    session = cache->find(request);
     BOOST_CHECK(session);
     if (session) {
         BOOST_CHECK_EQUAL(session.mutex()->getVersion(), 2);
@@ -196,7 +196,7 @@ BOOST_FIXTURE_TEST_CASE(MemorySessionCache_testUpdate, MemoryFixture)
     cookie = cookie + '=' + key + ".1";
     request.m_requestHeaders["Cookie"] = cookie;
 
-    unique_lock<Session> session = cache->find(request, true, false);
+    unique_lock<Session> session = cache->find(request);
     BOOST_CHECK(session);
 
     // Clear old response headers.
@@ -221,7 +221,7 @@ BOOST_FIXTURE_TEST_CASE(MemorySessionCache_testUpdate, MemoryFixture)
         session.unlock();
     }
 
-    session = cache->find(request, true, false);
+    session = cache->find(request);
     BOOST_CHECK(session);
     if (session) {
         BOOST_CHECK_EQUAL(session.mutex()->getVersion(), 2);

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


More information about the commits mailing list