directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r433484 - in /directory/trunks/apacheds: core/src/main/java/org/apache/directory/server/core/schema/ server-unit/src/test/java/org/apache/directory/server/
Date Tue, 22 Aug 2006 03:19:45 GMT
Author: akarasulu
Date: Mon Aug 21 20:19:44 2006
New Revision: 433484

URL: http://svn.apache.org/viewvc?rev=433484&view=rev
Log:
fix for DIRSERVER-630

Added:
    directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/IllegalModificationITest.java
      - copied unchanged from r433483, directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/IllegalModificationITest.java
Removed:
    directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/IllegalModification.java
Modified:
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?rev=433484&r1=433483&r2=433484&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
Mon Aug 21 20:19:44 2006
@@ -788,6 +788,17 @@
             {
                 objectClassMod = mods[ii];
             }
+            
+            // Freak out under some weird cases
+            if ( mods[0].getAttribute().size() == 0 )
+            {
+                // not ok for add but ok for replace and delete
+                if ( mods[0].getModificationOp() == DirContext.ADD_ATTRIBUTE )
+                {
+                    throw new LdapInvalidAttributeValueException( "No value is not a valid
value for an attribute.", 
+                        ResultCodeEnum.INVALIDATTRIBUTESYNTAX );
+                }
+            }
 
             StringBuffer keybuf = new StringBuffer();
             keybuf.append( mods[ii].getModificationOp() );



Mime
View raw message