projects
/
shibboleth
/
cpp-opensaml.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
54b7006
)
Add additional logging and fix a leak on an error path.
author
Scott Cantor
<cantor.2@osu.edu>
Tue, 24 Nov 2009 18:01:36 +0000
(18:01 +0000)
committer
Scott Cantor
<cantor.2@osu.edu>
Tue, 24 Nov 2009 18:01:36 +0000
(18:01 +0000)
saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp
patch
|
blob
|
history
diff --git
a/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp
b/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp
index
e9fab4d
..
b3e1502
100644
(file)
--- a/
saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp
+++ b/
saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp
@@
-116,8
+116,9
@@
XMLObject* SAML2ArtifactDecoder::decode(
// Check the type.
auto_ptr<SAML2Artifact> artifact2(dynamic_cast<SAML2Artifact*>(artifact));
if (!artifact2.get()) {
// Check the type.
auto_ptr<SAML2Artifact> artifact2(dynamic_cast<SAML2Artifact*>(artifact));
if (!artifact2.get()) {
- throw BindingException("Artifact binding requires SAML 2.0 artifact.");
delete artifact;
delete artifact;
+ log.error("wrong artifact type");
+ throw BindingException("Artifact binding requires SAML 2.0 artifact.");
}
log.debug("attempting to determine source of artifact...");
}
log.debug("attempting to determine source of artifact...");
@@
-158,8
+159,10
@@
XMLObject* SAML2ArtifactDecoder::decode(
// Now extract details from the payload and check that message.
XMLObject* payload = response->getPayload();
// Now extract details from the payload and check that message.
XMLObject* payload = response->getPayload();
- if (!payload)
+ if (!payload) {
+ log.error("ArtifactResponse message did not contain a protocol message");
throw BindingException("ArtifactResponse message did not contain a protocol message.");
throw BindingException("ArtifactResponse message did not contain a protocol message.");
+ }
extractMessageDetails(*payload, genericRequest, samlconstants::SAML20P_NS, policy);
policy.evaluate(*payload, &genericRequest);
extractMessageDetails(*payload, genericRequest, samlconstants::SAML20P_NS, policy);
policy.evaluate(*payload, &genericRequest);