[cpp-sp COMMIT] in /branches/REL_2/shibsp: handler/impl/SAML2Logout.cpp handler/impl/SAML2LogoutInitiator.cpp handler...
noreply at shibboleth.net
noreply at shibboleth.net
Thu Aug 2 13:07:08 EDT 2012
Author: scantor
Date: Thu Aug 2 13:07:07 2012
New Revision: 3746
URL: http://svn.shibboleth.net/view/cpp-sp?rev=3746&view=rev
Log:
Fix leaks in identifier generation
Modified:
branches/REL_2/shibsp/handler/impl/SAML2Logout.cpp
branches/REL_2/shibsp/handler/impl/SAML2LogoutInitiator.cpp
branches/REL_2/shibsp/handler/impl/SAML2SessionInitiator.cpp
branches/REL_2/shibsp/impl/StorageServiceSessionCache.cpp
Modified: branches/REL_2/shibsp/handler/impl/SAML2Logout.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/handler/impl/SAML2Logout.cpp?rev=3746&r1=3745&r2=3746&view=diff
==============================================================================
--- branches/REL_2/shibsp/handler/impl/SAML2Logout.cpp (original)
+++ branches/REL_2/shibsp/handler/impl/SAML2Logout.cpp Thu Aug 2 13:07:07 2012
@@ -679,7 +679,9 @@
logout->setIssuer(issuer);
issuer->setName(application.getRelyingParty(dynamic_cast<EntityDescriptor*>(role->getParent()))->getXMLString("entityID").second);
fillStatus(*logout, code, subcode, msg);
- logout->setID(SAMLConfig::getConfig().generateIdentifier());
+ XMLCh* msgid = SAMLConfig::getConfig().generateIdentifier();
+ logout->setID(msgid);
+ XMLString::release(&msgid);
logout->setIssueInstant(time(nullptr));
if (logoutEvent) {
Modified: branches/REL_2/shibsp/handler/impl/SAML2LogoutInitiator.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/handler/impl/SAML2LogoutInitiator.cpp?rev=3746&r1=3745&r2=3746&view=diff
==============================================================================
--- branches/REL_2/shibsp/handler/impl/SAML2LogoutInitiator.cpp (original)
+++ branches/REL_2/shibsp/handler/impl/SAML2LogoutInitiator.cpp Thu Aug 2 13:07:07 2012
@@ -527,7 +527,9 @@
msg->setNameID(nameid->cloneNameID());
}
- msg->setID(SAMLConfig::getConfig().generateIdentifier());
+ XMLCh* msgid = SAMLConfig::getConfig().generateIdentifier();
+ msg->setID(msgid);
+ XMLString::release(&msgid);
msg->setIssueInstant(time(nullptr));
if (m_async && encoder) {
Modified: branches/REL_2/shibsp/handler/impl/SAML2SessionInitiator.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/handler/impl/SAML2SessionInitiator.cpp?rev=3746&r1=3745&r2=3746&view=diff
==============================================================================
--- branches/REL_2/shibsp/handler/impl/SAML2SessionInitiator.cpp (original)
+++ branches/REL_2/shibsp/handler/impl/SAML2SessionInitiator.cpp Thu Aug 2 13:07:07 2012
@@ -713,7 +713,9 @@
}
}
- req->setID(SAMLConfig::getConfig().generateIdentifier());
+ XMLCh* genid = SAMLConfig::getConfig().generateIdentifier();
+ req->setID(genid);
+ XMLString::release(&genid);
req->setIssueInstant(time(nullptr));
scoped_ptr<AuthnRequestEvent> ar_event(newAuthnRequestEvent(app, httpRequest));
Modified: branches/REL_2/shibsp/impl/StorageServiceSessionCache.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/impl/StorageServiceSessionCache.cpp?rev=3746&r1=3745&r2=3746&view=diff
==============================================================================
--- branches/REL_2/shibsp/impl/StorageServiceSessionCache.cpp (original)
+++ branches/REL_2/shibsp/impl/StorageServiceSessionCache.cpp Thu Aug 2 13:07:07 2012
@@ -891,7 +891,9 @@
void SSCache::test()
{
- auto_ptr_char temp(SAMLConfig::getConfig().generateIdentifier());
+ XMLCh* wide = SAMLConfig::getConfig().generateIdentifier();
+ auto_ptr_char temp(wide);
+ XMLString::release(&wide);
m_storage->createString("SessionCacheTest", temp.get(), "Test", time(nullptr) + 60);
m_storage->deleteString("SessionCacheTest", temp.get());
}
More information about the commits
mailing list