Skip replay check when cache missing.
authorcantor <cantor@fb386ef7-a10c-0410-8ebf-fd3f8e989ab0>
Thu, 15 Feb 2007 04:11:22 +0000 (04:11 +0000)
committercantor <cantor@fb386ef7-a10c-0410-8ebf-fd3f8e989ab0>
Thu, 15 Feb 2007 04:11:22 +0000 (04:11 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-opensaml2/trunk@187 fb386ef7-a10c-0410-8ebf-fd3f8e989ab0

saml/binding/impl/MessageFlowRule.cpp

index b18f472..facb617 100644 (file)
@@ -83,14 +83,16 @@ void MessageFlowRule::evaluate(const XMLObject& message, const GenericRequest* r
     
     // Check replay.
     if (m_checkReplay) {
+        ReplayCache* replayCache = XMLToolingConfig::getConfig().getReplayCache();
+        if (!replayCache) {
+            log.warn("no ReplayCache available, skipping requested replay check");
+            return;
+        }
         const XMLCh* id = policy.getMessageID();
         if (!id || !*id) {
             log.debug("unknown message ID, no replay check possible");
             return;
         }
-        ReplayCache* replayCache = XMLToolingConfig::getConfig().getReplayCache();
-        if (!replayCache)
-            throw BindingException("Message rejected, no ReplayCache instance available.");
         auto_ptr_char temp(id);
         if (!replayCache->check("MessageFlow", temp.get(), issueInstant + skew + m_expires)) {
             log.error("replay detected of message ID (%s)", temp.get());