directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r348442 - /directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapControlGrammar.java
Date Wed, 23 Nov 2005 14:03:03 GMT
Author: elecharny
Date: Wed Nov 23 06:02:59 2005
New Revision: 348442

URL: http://svn.apache.org/viewcvs?rev=348442&view=rev
Log:
Add a check on the OID to verify that it is valid

Modified:
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapControlGrammar.java

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapControlGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapControlGrammar.java?rev=348442&r1=348441&r2=348442&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapControlGrammar.java
(original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapControlGrammar.java
Wed Nov 23 06:02:59 2005
@@ -34,6 +34,7 @@
 import org.apache.asn1new.ldap.codec.primitives.LdapStringEncodingException;
 import org.apache.asn1new.ldap.pojo.Control;
 import org.apache.asn1new.ldap.pojo.LdapMessage;
+import org.apache.asn1new.primitives.OID;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -193,6 +194,9 @@
                         	// The OID is encoded as a String, not an Object Id
                         	try 
                         	{
+                        		String oidString = StringUtils.toUtf8( tlv.getValue().getData()
);
+                        		
+                        		OID oid = new OID( oidString );
                         		control.setControlType( new LdapString( tlv.getValue().getData()
) );
                         	}
                         	catch ( LdapStringEncodingException lsee )



Mime
View raw message