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:
cffbba9
)
Expose detection of duplicate insertions.
author
Scott Cantor
<cantor.2@osu.edu>
Thu, 28 Jun 2007 23:41:25 +0000
(23:41 +0000)
committer
Scott Cantor
<cantor.2@osu.edu>
Thu, 28 Jun 2007 23:41:25 +0000
(23:41 +0000)
saml/binding/impl/ArtifactMap.cpp
patch
|
blob
|
history
diff --git
a/saml/binding/impl/ArtifactMap.cpp
b/saml/binding/impl/ArtifactMap.cpp
index
c22c6ef
..
2028ac0
100644
(file)
--- a/
saml/binding/impl/ArtifactMap.cpp
+++ b/
saml/binding/impl/ArtifactMap.cpp
@@
-204,9
+204,14
@@
void ArtifactMap::storeContent(XMLObject* content, const SAMLArtifact* artifact,
// Serialize the root element, whatever it is, for storage.
string xmlbuf;
XMLHelper::serialize(root, xmlbuf);
// Serialize the root element, whatever it is, for storage.
string xmlbuf;
XMLHelper::serialize(root, xmlbuf);
- m_storage->createText(
- m_context.c_str(), SAMLArtifact::toHex(artifact->getMessageHandle()).c_str(), xmlbuf.c_str(), time(NULL) + m_artifactTTL
- );
+ if (!m_storage->createText(
+ m_context.c_str(),
+ SAMLArtifact::toHex(artifact->getMessageHandle()).c_str(),
+ xmlbuf.c_str(),
+ time(NULL) + m_artifactTTL
+ )) {
+ throw IOException("Attempt to insert duplicate artifact into map.");
+ }
// Cleanup by destroying XML.
delete content;
// Cleanup by destroying XML.
delete content;