From c44abc33cda3840a0ff1cfe889f2776f13607192 Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Wed, 21 Jan 2015 18:20:06 +0000 Subject: [PATCH] Add a redundant safety check to insert --- 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 b816624..0c5ffe8 100644 --- a/shibsp/impl/StorageServiceSessionCache.cpp +++ b/shibsp/impl/StorageServiceSessionCache.cpp @@ -1040,8 +1040,14 @@ void SSCache::test() 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(); -- 2.1.4