From 28e4fb2d10b3c51113909f01a2bca402668c28aa Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Wed, 9 Jan 2013 05:35:31 +0000 Subject: [PATCH] https://issues.shibboleth.net/jira/browse/CPPOST-81 --- config_win32.h | 6 +++--- configure.ac | 2 +- saml/Makefile.am | 2 +- saml/saml.rc | 12 ++++++------ saml/util/CommonDomainCookie.cpp | 25 +++++++++++++++---------- saml/version.h | 2 +- samlsign/samlsign.rc | 12 ++++++------ 7 files changed, 33 insertions(+), 28 deletions(-) diff --git a/config_win32.h b/config_win32.h index 7402cc1..5d4db31 100644 --- a/config_win32.h +++ b/config_win32.h @@ -87,13 +87,13 @@ #define PACKAGE_NAME "opensaml" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "opensaml 2.5.1" +#define PACKAGE_STRING "opensaml 2.5.2" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "opensaml" /* Define to the version of this package. */ -#define PACKAGE_VERSION "2.5.1" +#define PACKAGE_VERSION "2.5.2" /* Define to the necessary symbol if this constant uses a non-standard name on your system. */ @@ -106,7 +106,7 @@ /* #undef TM_IN_SYS_TIME */ /* Version number of package */ -#define VERSION "2.5.1" +#define VERSION "2.5.2" /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/configure.ac b/configure.ac index 4d2b783..38233e3 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.50]) -AC_INIT([opensaml],[2.5.1],[https://issues.shibboleth.net/],[opensaml]) +AC_INIT([opensaml],[2.5.2],[https://issues.shibboleth.net/],[opensaml]) AC_CONFIG_SRCDIR(saml) AC_CONFIG_AUX_DIR(build-aux) AC_CONFIG_MACRO_DIR(m4) diff --git a/saml/Makefile.am b/saml/Makefile.am index 643ab6d..ffb9831 100644 --- a/saml/Makefile.am +++ b/saml/Makefile.am @@ -191,7 +191,7 @@ libsaml_la_SOURCES = \ # this is different from the project version # http://sources.redhat.com/autobook/autobook/autobook_91.html -libsaml_la_LDFLAGS = -version-info 8:1:0 +libsaml_la_LDFLAGS = -version-info 8:2:0 install-exec-hook: for la in $(lib_LTLIBRARIES) ; do rm -f $(DESTDIR)$(libdir)/$$la ; done diff --git a/saml/saml.rc b/saml/saml.rc index 85a66e2..a381b5b 100644 --- a/saml/saml.rc +++ b/saml/saml.rc @@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,5,1,0 - PRODUCTVERSION 2,5,1,0 + FILEVERSION 2,5,2,0 + PRODUCTVERSION 2,5,2,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -47,13 +47,13 @@ BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "Shibboleth Consortium\0" VALUE "FileDescription", "OpenSAML Library\0" - VALUE "FileVersion", "2, 5, 1, 0\0" + VALUE "FileVersion", "2, 5, 2, 0\0" #ifdef _DEBUG VALUE "InternalName", "saml2_5D\0" #else VALUE "InternalName", "saml2_5\0" #endif - VALUE "LegalCopyright", "Copyright © 2012 UCAID\0" + VALUE "LegalCopyright", "Copyright © 2013 UCAID\0" VALUE "LegalTrademarks", "\0" #ifdef _DEBUG VALUE "OriginalFilename", "saml2_5D.dll\0" @@ -61,8 +61,8 @@ BEGIN VALUE "OriginalFilename", "saml2_5.dll\0" #endif VALUE "PrivateBuild", "\0" - VALUE "ProductName", "OpenSAML 2.5.1\0" - VALUE "ProductVersion", "2, 5, 1, 0\0" + VALUE "ProductName", "OpenSAML 2.5.2\0" + VALUE "ProductVersion", "2, 5, 2, 0\0" VALUE "SpecialBuild", "\0" END END diff --git a/saml/util/CommonDomainCookie.cpp b/saml/util/CommonDomainCookie.cpp index 5fa1391..23b15ef 100644 --- a/saml/util/CommonDomainCookie.cpp +++ b/saml/util/CommonDomainCookie.cpp @@ -53,6 +53,9 @@ CommonDomainCookie::CommonDomainCookie(const char* cookie) split(m_list, b64, is_space(), algorithm::token_compress_on); free(b64); + // Remove empty elements. + m_list.erase(remove(m_list.begin(), m_list.end(), ""), m_list.end()); + // Now Base64 decode the list elements, overwriting them. xsecsize_t len; for (vector::iterator i = m_list.begin(); i != m_list.end(); ++i) { @@ -90,22 +93,24 @@ const char* CommonDomainCookie::set(const char* entityID) xsecsize_t len; string delimited; for (vector::const_iterator j = m_list.begin(); j != m_list.end(); ++j) { - if (!delimited.empty()) - delimited += ' '; XMLByte* b64 = Base64::encode(reinterpret_cast(j->c_str()), j->length(), &len); - XMLByte *pos, *pos2; - for (pos = b64, pos2 = b64; *pos2; ++pos2) - if (isgraph(*pos2)) - *pos++ = *pos2; - *pos = 0; + if (b64) { + XMLByte *pos, *pos2; + for (pos = b64, pos2 = b64; *pos2; ++pos2) + if (isgraph(*pos2)) + *pos++ = *pos2; + *pos = 0; - delimited += reinterpret_cast(b64); + if (!delimited.empty()) + delimited += ' '; + delimited += reinterpret_cast(b64); #ifdef OPENSAML_XERCESC_HAS_XMLBYTE_RELEASE - XMLString::release(&b64); + XMLString::release(&b64); #else - XMLString::release((char**)&b64); + XMLString::release((char**)&b64); #endif + } } m_encoded = XMLToolingConfig::getConfig().getURLEncoder()->encode(delimited.c_str()); diff --git a/saml/version.h b/saml/version.h index 9f9656d..6102bfe 100644 --- a/saml/version.h +++ b/saml/version.h @@ -44,7 +44,7 @@ #define OPENSAML_VERSION_MAJOR 2 #define OPENSAML_VERSION_MINOR 5 -#define OPENSAML_VERSION_REVISION 1 +#define OPENSAML_VERSION_REVISION 2 /** DO NOT MODIFY BELOW THIS LINE */ diff --git a/samlsign/samlsign.rc b/samlsign/samlsign.rc index 2696ee6..c44a4a1 100644 --- a/samlsign/samlsign.rc +++ b/samlsign/samlsign.rc @@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,5,1,0 - PRODUCTVERSION 2,5,1,0 + FILEVERSION 2,5,2,0 + PRODUCTVERSION 2,5,2,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -47,14 +47,14 @@ BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "Shibboleth Consortium\0" VALUE "FileDescription", "OpenSAML Signature Utility\0" - VALUE "FileVersion", "2, 5, 1, 0\0" + VALUE "FileVersion", "2, 5, 2, 0\0" VALUE "InternalName", "samlsign\0" - VALUE "LegalCopyright", "Copyright © 2012 UCAID\0" + VALUE "LegalCopyright", "Copyright © 2013 UCAID\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "samlsign.exe\0" VALUE "PrivateBuild", "\0" - VALUE "ProductName", "OpenSAML 2.5.1\0" - VALUE "ProductVersion", "2, 5, 1, 0\0" + VALUE "ProductName", "OpenSAML 2.5.2\0" + VALUE "ProductVersion", "2, 5, 2, 0\0" VALUE "SpecialBuild", "\0" END END -- 2.1.4