You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by co...@apache.org on 2012/02/08 11:14:10 UTC

svn commit: r1241844 - in /santuario/xml-security-java/trunk: CHANGELOG.txt src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverFragment.java

Author: coheigea
Date: Wed Feb  8 10:14:10 2012
New Revision: 1241844

URL: http://svn.apache.org/viewvc?rev=1241844&view=rev
Log:
[SANTUARIO-299] - StringIndexOutOfBoundsException is thrown during reference verification (if URI = "#")

Modified:
    santuario/xml-security-java/trunk/CHANGELOG.txt
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverFragment.java

Modified: santuario/xml-security-java/trunk/CHANGELOG.txt
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/CHANGELOG.txt?rev=1241844&r1=1241843&r2=1241844&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/CHANGELOG.txt (original)
+++ santuario/xml-security-java/trunk/CHANGELOG.txt Wed Feb  8 10:14:10 2012
@@ -1,6 +1,7 @@
 Changelog for "Apache xml-security" <http://santuario.apache.org/>
 
 New in v1.5.1-SNAPSHOT:
+    Fixed SANTUARIO-299 - StringIndexOutOfBoundsException is thrown during reference verification (if URI = "#")
     Fixed SANTUARIO-297 - Exceptions should use a JDK exception cause mechanism
 
 New in v1.5.0:

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverFragment.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverFragment.java?rev=1241844&r1=1241843&r2=1241844&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverFragment.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverFragment.java Wed Feb  8 10:14:10 2012
@@ -131,8 +131,7 @@ public class ResolverFragment extends Re
 
         String uriNodeValue = uri.getNodeValue();
         if (uriNodeValue.equals("") || 
-            ((uriNodeValue.charAt(0) == '#') 
-                && !((uriNodeValue.charAt(1) == 'x') && uriNodeValue.startsWith("#xpointer(")))
+            ((uriNodeValue.charAt(0) == '#') && !uriNodeValue.startsWith("#xpointer("))
         ) {
             if (log.isDebugEnabled()) {
                 log.debug("State I can resolve reference: \"" + uriNodeValue + "\"");