[cpp-sp] branch main updated: SSPCPP-927 - Check for missing DataSealer during cookie recovery

Scott Cantor cantor.2 at osu.edu
Thu Apr 22 20:01:47 UTC 2021


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=5a47c3b9378f4c49392dd4d15189b70956f9f2ec

The following commit(s) were added to refs/heads/main by this push:
       new  5a47c3b9  SSPCPP-927 - Check for missing DataSealer during cookie recovery
5a47c3b9 is described below

commit 5a47c3b9378f4c49392dd4d15189b70956f9f2ec
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Apr 22 15:58:43 2021 -0400

    SSPCPP-927 - Check for missing DataSealer during cookie recovery
    
    https://issues.shibboleth.net/jira/browse/SSPCPP-927
---
 shibsp/impl/StorageServiceSessionCache.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/shibsp/impl/StorageServiceSessionCache.cpp b/shibsp/impl/StorageServiceSessionCache.cpp
index 2bc74108..a8d5c64b 100644
--- a/shibsp/impl/StorageServiceSessionCache.cpp
+++ b/shibsp/impl/StorageServiceSessionCache.cpp
@@ -1148,6 +1148,12 @@ bool SSCache::recover(const Application& app, const char* key, const char* data)
     else {
         // We're out of process, so we can recover the session.
 #ifndef SHIBSP_LITE
+        const DataSealer* sealer = XMLToolingConfig::getConfig().getDataSealer();
+        if (!sealer) {
+            m_log.warn("can't attempt recovery of session (%s), no DataSealer configured", key);
+            return false;
+        }
+
         m_log.debug("checking for revocation of session (%s)", key);
         try {
             if (m_storage_lite->readString("Revoked", key) > 0) {
@@ -1174,7 +1180,7 @@ bool SSCache::recover(const Application& app, const char* key, const char* data)
         try {
             dup = strdup(data);
             XMLToolingConfig::getConfig().getURLEncoder()->decode(dup);
-            unwrapped = XMLToolingConfig::getConfig().getDataSealer()->unwrap(dup);
+            unwrapped = sealer->unwrap(dup);
             free(dup);
 
             stringstream str(unwrapped);

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


More information about the commits mailing list