You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by sc...@apache.org on 2017/08/31 15:56:28 UTC

svn commit: r1806817 - in /santuario/xml-security-cpp/trunk/xsec: framework/XSECW32Config.hpp utils/winutils/XSECURIResolverGenericWin32.cpp

Author: scantor
Date: Thu Aug 31 15:56:27 2017
New Revision: 1806817

URL: http://svn.apache.org/viewvc?rev=1806817&view=rev
Log:
Assume Xerces 3 - remove XSEC_XERCES_BROKEN_XMLURI

Modified:
    santuario/xml-security-cpp/trunk/xsec/framework/XSECW32Config.hpp
    santuario/xml-security-cpp/trunk/xsec/utils/winutils/XSECURIResolverGenericWin32.cpp

Modified: santuario/xml-security-cpp/trunk/xsec/framework/XSECW32Config.hpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/framework/XSECW32Config.hpp?rev=1806817&r1=1806816&r2=1806817&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/framework/XSECW32Config.hpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/framework/XSECW32Config.hpp Thu Aug 31 15:56:27 2017
@@ -43,11 +43,6 @@
 
 #	define XSEC_XERCES_XMLSTRING_HAS_RELEASE 1
 
-#else
-/*
- * In version 2.2, the XMLUri class was broken for relative URI de-referencing
- */
-#	define XSEC_XERCES_BROKEN_XMLURI 1
 #endif
 
 

Modified: santuario/xml-security-cpp/trunk/xsec/utils/winutils/XSECURIResolverGenericWin32.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/utils/winutils/XSECURIResolverGenericWin32.cpp?rev=1806817&r1=1806816&r2=1806817&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/utils/winutils/XSECURIResolverGenericWin32.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/utils/winutils/XSECURIResolverGenericWin32.cpp Thu Aug 31 15:56:27 2017
@@ -155,40 +155,10 @@ BinInputStream * XSECURIResolverGenericW
 
 	// Create the appropriate XMLUri objects
 	if (mp_baseURI != NULL) {
-		XMLUri	* turi;
-
-#if defined(XSEC_XERCES_BROKEN_XMLURI)
-
-		// XMLUri relative paths are broken, so we need to strip out ".."
-		// Doesn't fix the whole problem, but gets us somewhere
-
-		XSECAutoPtrXMLCh b(mp_baseURI);
-		XSECAutoPtrXMLCh r(uri);
-
-		int index = 0;
-		while (XMLString::startsWith(&(r.get()[index]), DOTDOT_SLASH)) {
-
-			// Strip the last segment of the base
-
-			int lastIndex = XMLString::lastIndexOf(b.get(), XERCES_CPP_NAMESPACE_QUALIFIER chForwardSlash);
-			if (lastIndex > 0)
-				const_cast<XMLCh*>(b.get())[lastIndex] = 0;
-
-			index += 3;
-
-		}
-
-		XSECnew(turi, XMLUri(b.get()));
-		Janitor<XMLUri> j_turi(turi);
-		XSECnew(xmluri, XMLUri(turi, &(r.get()[index])));
-
-#else
-		turi = new XMLUri(mp_baseURI);
+		XMLUri* turi = new XMLUri(mp_baseURI);
 		Janitor<XMLUri> j_turi(turi);
 
 		xmluri = new XMLUri(turi, uri);
-#endif
-
 	}
 	else {
 		xmluri = new XMLUri(uri);