[cpp-sp] branch main updated: Fix a missing else clause.

Scott Cantor cantor.2 at osu.edu
Wed Sep 17 14:08:17 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=43af597d12627dc26e8fbb59fb034e6c4186e329

The following commit(s) were added to refs/heads/main by this push:
     new 43af597d Fix a missing else clause.
43af597d is described below

commit 43af597d12627dc26e8fbb59fb034e6c4186e329
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Sep 17 10:08:14 2025 -0400

    Fix a missing else clause.
---
 shibsp/session/impl/AbstractSessionCache.cpp | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/shibsp/session/impl/AbstractSessionCache.cpp b/shibsp/session/impl/AbstractSessionCache.cpp
index 5aa2c344..84db1886 100644
--- a/shibsp/session/impl/AbstractSessionCache.cpp
+++ b/shibsp/session/impl/AbstractSessionCache.cpp
@@ -417,13 +417,11 @@ unique_lock<Session> AbstractSessionCache::find(SPRequest& request, bool checkTi
         timeout,
         client_addr.empty() ? nullptr : client_addr.c_str());
     if (!session) {
-        // If no session, we need to clear the session cookie to prevent further use.
+        // No session, we need to clear the session cookie to prevent further use.
         m_log.debug("clearing cookie for session (%s)", keyver.first.c_str());
         m_cookieManager->unsetCookie(request);
-    }
-
-    // If the returned session's version is newrer than our cookie value, we need to update our cookie.
-    if (session.mutex()->getVersion() > keyver.second) {
+    } else if (session.mutex()->getVersion() > keyver.second) {
+        // The returned session's version is newer than our cookie value, we need to update our cookie.
         string new_cookieval(keyver.first);
         computeVersionedFilename(new_cookieval, session.mutex()->getVersion());
         m_cookieManager->setCookie(request, new_cookieval.c_str());

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


More information about the commits mailing list