jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r669107 - in /jackrabbit/trunk/jackrabbit-core/src: main/java/org/apache/jackrabbit/core/security/user/IndexNodeResolver.java test/java/org/apache/jackrabbit/core/security/user/NodeResolverTest.java
Date Wed, 18 Jun 2008 08:18:37 GMT
Author: mreutegg
Date: Wed Jun 18 01:18:34 2008
New Revision: 669107

URL: http://svn.apache.org/viewvc?rev=669107&view=rev
Log:
JCR-1647: UserManager throws javax.jcr.query.InvalidQueryException on createUser

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/IndexNodeResolver.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/user/NodeResolverTest.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/IndexNodeResolver.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/IndexNodeResolver.java?rev=669107&r1=669106&r2=669107&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/IndexNodeResolver.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/IndexNodeResolver.java
Wed Jun 18 01:18:34 2008
@@ -98,7 +98,7 @@
         StringBuffer stmt = new StringBuffer("/jcr:root");
         stmt.append(getSearchRoot(ntName));
         stmt.append("//element(");
-        stmt.append(getNamePathResolver().getJCRName(nodeName));
+        stmt.append(ISO9075.encode(getNamePathResolver().getJCRName(nodeName)));
         stmt.append(",");
         stmt.append(getNamePathResolver().getJCRName(ntName));
         stmt.append(")");

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/user/NodeResolverTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/user/NodeResolverTest.java?rev=669107&r1=669106&r2=669107&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/user/NodeResolverTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/user/NodeResolverTest.java
Wed Jun 18 01:18:34 2008
@@ -20,6 +20,7 @@
 import org.apache.jackrabbit.core.SessionImpl;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
+import org.apache.jackrabbit.spi.commons.name.NameFactoryImpl;
 import org.apache.jackrabbit.test.AbstractJCRTest;
 import org.apache.jackrabbit.test.NotExecutableException;
 import org.slf4j.Logger;
@@ -236,4 +237,10 @@
     public void testGetSession() {
         assertNotNull(nodeResolver.getSession());
     }
+
+    public void testFindNodeEscape() throws RepositoryException {
+        Name n = NameFactoryImpl.getInstance().create("",
+                "someone" + "@apache.org");
+        nodeResolver.findNode(n, UserConstants.NT_REP_USER);
+    }
 }
\ No newline at end of file



Mime
View raw message