directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r675343 - in /directory/shared/trunk/ldap/src: main/java/org/apache/directory/shared/ldap/filter/FilterParser.java test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java
Date Wed, 09 Jul 2008 21:18:24 GMT
Author: elecharny
Date: Wed Jul  9 14:18:24 2008
New Revision: 675343

URL: http://svn.apache.org/viewvc?rev=675343&view=rev
Log:
Fixed DIRSERVER-1196
Added a test for this issue

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/FilterParser.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/FilterParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/FilterParser.java?rev=675343&r1=675342&r2=675343&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/FilterParser.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/FilterParser.java
Wed Jul  9 14:18:24 2008
@@ -307,6 +307,11 @@
 
                     pos.start++;
                 }
+                else
+                {
+                    // This is an error
+                    throw new ParseException( "Bad substring", pos.start );
+                }
             }
         }
         else

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java?rev=675343&r1=675342&r2=675343&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java
Wed Jul  9 14:18:24 2008
@@ -657,6 +657,22 @@
     }
 
 
+    
+    
+    @Test
+    public void testSpecialCharsInMemberOf()
+    {
+        try
+        {
+            FilterParser.parse("(memberOf=1.2.840.113556.1.4.1301=$#@&*()==,2.5.4.11=local,2.5.4.11=users,2.5.4.11=readimanager)");
+            fail();
+        }
+        catch ( ParseException pe )
+        {
+            assertTrue( true );
+        }
+    }
+
     /*
     @Test
     public void testPerf() throws ParseException



Mime
View raw message