[cpp-sp COMMIT] /branches/REL_2/shibsp/handler/impl/SAML2SessionInitiator.cpp
noreply at shibboleth.net
noreply at shibboleth.net
Fri Sep 23 00:59:11 BST 2011
Author: scantor
Date: Fri Sep 23 00:59:10 2011
New Revision: 3522
URL: http://svn.shibboleth.net/view/cpp-sp?rev=3522&view=rev
Log:
https://issues.shibboleth.net/jira/browse/SSPCPP-394
Modified:
branches/REL_2/shibsp/handler/impl/SAML2SessionInitiator.cpp
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=3522&r1=3521&r2=3522&view=diff
==============================================================================
--- branches/REL_2/shibsp/handler/impl/SAML2SessionInitiator.cpp (original)
+++ branches/REL_2/shibsp/handler/impl/SAML2SessionInitiator.cpp Fri Sep 23 00:59:10 2011
@@ -674,10 +674,23 @@
}
if (authnContextClassRef) {
reqContext->getAuthnContextDeclRefs().clear();
- auto_ptr_XMLCh wideclass(authnContextClassRef);
- AuthnContextClassRef* cref = AuthnContextClassRefBuilder::buildAuthnContextClassRef();
- cref->setReference(wideclass.get());
- reqContext->getAuthnContextClassRefs().push_back(cref);
+ XMLCh* wideclass = XMLString::transcode(authnContextClassRef);
+ XMLString::trim(wideclass);
+ int pos;
+ XMLCh* start = wideclass;
+ while (start && *start) {
+ pos = XMLString::indexOf(start, chSpace);
+ if (pos != -1)
+ *(start + pos) = chNull;
+ AuthnContextClassRef* cref = AuthnContextClassRefBuilder::buildAuthnContextClassRef();
+ cref->setReference(start);
+ reqContext->getAuthnContextClassRefs().push_back(cref);
+ if (pos != -1)
+ start = start + pos + 1;
+ else
+ break;
+ }
+ XMLString::release(&wideclass);
}
if (reqContext->getAuthnContextClassRefs().empty() && reqContext->getAuthnContextDeclRefs().empty()) {
More information about the commits
mailing list