From 122fff5341949378022f3c85d97596e914162ca2 Mon Sep 17 00:00:00 2001 From: cantor Date: Thu, 10 Jan 2008 15:59:03 +0000 Subject: [PATCH] Check for empty payload. git-svn-id: https://svn.middleware.georgetown.edu/cpp-opensaml2/trunk@360 fb386ef7-a10c-0410-8ebf-fd3f8e989ab0 --- saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp b/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp index c5f9209..47fc608 100644 --- a/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp +++ b/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp @@ -153,6 +153,8 @@ XMLObject* SAML2ArtifactDecoder::decode( // Now extract details from the payload and check that message. XMLObject* payload = response->getPayload(); + if (!payload) + throw BindingException("ArtifactResponse message did not contain a protocol message."); extractMessageDetails(*payload, genericRequest, samlconstants::SAML20P_NS, policy); policy.evaluate(*payload, &genericRequest); -- 2.1.4