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:
47847f1
)
https://issues.shibboleth.net/jira/browse/CPPOST-61
author
Scott Cantor
<cantor.2@osu.edu>
Sat, 15 Jan 2011 20:08:35 +0000
(20:08 +0000)
committer
Scott Cantor
<cantor.2@osu.edu>
Sat, 15 Jan 2011 20:08:35 +0000
(20:08 +0000)
saml/saml2/binding/impl/SAML2RedirectEncoder.cpp
patch
|
blob
|
history
diff --git
a/saml/saml2/binding/impl/SAML2RedirectEncoder.cpp
b/saml/saml2/binding/impl/SAML2RedirectEncoder.cpp
index
616d98f
..
bb28484
100644
(file)
--- a/
saml/saml2/binding/impl/SAML2RedirectEncoder.cpp
+++ b/
saml/saml2/binding/impl/SAML2RedirectEncoder.cpp
@@
-138,15
+138,18
@@
long SAML2RedirectEncoder::encode(
throw BindingException("Base64 encoding of XML failed.");
// Create beginnings of redirect query string.
throw BindingException("Base64 encoding of XML failed.");
// Create beginnings of redirect query string.
- const URLEncoder* escaper = XMLToolingConfig::getConfig().getURLEncoder();
xmlbuf.erase();
xmlbuf.erase();
- xmlbuf.append(reinterpret_cast<char*>(encoded), xlen);
+ for (const XMLByte* xb = encoded; *xb; ++xb) {
+ if (!isspace(*xb))
+ xmlbuf += *xb;
+ }
#ifdef OPENSAML_XERCESC_HAS_XMLBYTE_RELEASE
XMLString::release(&encoded);
#else
XMLString::release((char**)&encoded);
#endif
#ifdef OPENSAML_XERCESC_HAS_XMLBYTE_RELEASE
XMLString::release(&encoded);
#else
XMLString::release((char**)&encoded);
#endif
+ const URLEncoder* escaper = XMLToolingConfig::getConfig().getURLEncoder();
xmlbuf = (request ? "SAMLRequest=" : "SAMLResponse=") + escaper->encode(xmlbuf.c_str());
if (relayState && *relayState)
xmlbuf = xmlbuf + "&RelayState=" + escaper->encode(relayState);
xmlbuf = (request ? "SAMLRequest=" : "SAMLResponse=") + escaper->encode(xmlbuf.c_str());
if (relayState && *relayState)
xmlbuf = xmlbuf + "&RelayState=" + escaper->encode(relayState);