[cpp-sp COMMIT] /branches/REL_2/shibsp/impl/StorageServiceSessionCache.cpp

noreply at shibboleth.net noreply at shibboleth.net
Wed Jan 21 13:20:07 EST 2015


Author: scantor
Date: Wed Jan 21 13:20:06 2015
New Revision: 3896

URL: http://svn.shibboleth.net/view/cpp-sp?rev=3896&view=rev
Log:
Add a redundant safety check to insert

Modified:
    branches/REL_2/shibsp/impl/StorageServiceSessionCache.cpp

Modified: branches/REL_2/shibsp/impl/StorageServiceSessionCache.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/impl/StorageServiceSessionCache.cpp?rev=3896&r1=3895&r2=3896&view=diff
==============================================================================
--- branches/REL_2/shibsp/impl/StorageServiceSessionCache.cpp (original)
+++ branches/REL_2/shibsp/impl/StorageServiceSessionCache.cpp Wed Jan 21 13:20:06 2015
@@ -1040,8 +1040,14 @@
 
 void SSCache::insert(const char* key, time_t expires, const char* name, const char* index, short attempts)
 {
-    if (attempts > 10)
+    if (attempts > 10) {
         throw IOException("Exceeded retry limit.");
+    }
+
+    if (!name || !*name) {
+        m_log.warn("NameID value was empty or null, ignoring request to store for logout");
+        return;
+    }
 
     string dup;
     unsigned int storageLimit = m_storage_lite->getCapabilities().getKeySize();



More information about the commits mailing list