[cpp-sp] branch main updated: Add file-backed unit test for address rebind.

Scott Cantor cantor.2 at osu.edu
Tue Sep 16 18:14:34 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=e7fd79ab4c4856966649f8a9cef0d45c1f7e5c0f

The following commit(s) were added to refs/heads/main by this push:
     new e7fd79ab Add file-backed unit test for address rebind.
e7fd79ab is described below

commit e7fd79ab4c4856966649f8a9cef0d45c1f7e5c0f
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Sep 16 14:14:31 2025 -0400

    Add file-backed unit test for address rebind.
---
 tests/session/impl/FilesystemSessionCacheTests.cpp | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tests/session/impl/FilesystemSessionCacheTests.cpp b/tests/session/impl/FilesystemSessionCacheTests.cpp
index 98e3b67c..c1a51e9f 100644
--- a/tests/session/impl/FilesystemSessionCacheTests.cpp
+++ b/tests/session/impl/FilesystemSessionCacheTests.cpp
@@ -144,6 +144,19 @@ BOOST_FIXTURE_TEST_CASE(FilesystemSessionCache_tests, FilesystemFixture)
     // Clear old response headers.
     request.m_responseHeaders.clear();
 
+    // Force an address re-bind, which should revise the session version.
+    request.m_addr = "::1";
+
+    session = cache->find(request, true, false);
+    BOOST_CHECK(session);
+    if (session) {
+        BOOST_CHECK_EQUAL(session.mutex()->getVersion(), 2);
+        header = cookieName + '=' + key + ".2"; 
+        header += "; Path=/; Secure=1; HttpOnly=1; SameSite=None";
+        BOOST_CHECK_EQUAL(request.m_responseHeaders["Set-Cookie"], header);
+        session.unlock();
+    }
+
     cache->remove(request);
 
     header = cookieName;

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


More information about the commits mailing list