From 37af0ef44fc0876889da39db3760521d451460cf Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Fri, 06 Jul 2007 20:17:01 +0000
Subject: [PATCH] Update the server to reject requests from LDAPv2 clients if those requests contain controls.  Previously, the server would only strip out any response controls, but this is likely to hide problems and/or create debugging difficulty, so the requests will now be rejected and the associated connection terminated.

---
 opends/src/server/org/opends/server/messages/ProtocolMessages.java |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/messages/ProtocolMessages.java b/opends/src/server/org/opends/server/messages/ProtocolMessages.java
index 7c1c813..6577ca0 100644
--- a/opends/src/server/org/opends/server/messages/ProtocolMessages.java
+++ b/opends/src/server/org/opends/server/messages/ProtocolMessages.java
@@ -4649,6 +4649,16 @@
 
 
   /**
+   * The message ID for the message that will be used to indicate that an LDAPv2
+   * client tried to send a request that included request controls.  This does
+   * not take any arguments.
+   */
+  public static final int MSGID_LDAPV2_CONTROLS_NOT_ALLOWED =
+       CATEGORY_MASK_PROTOCOL | SEVERITY_MASK_MILD_ERROR | 431;
+
+
+
+  /**
    * Associates a set of generic messages with the message IDs defined in this
    * class.
    */
@@ -6055,6 +6065,8 @@
                     "extended operation request (LDAP message ID %d), which " +
                     "is not allowed for LDAPv2 clients.  The connection will " +
                     "be terminated");
+    registerMessage(MSGID_LDAPV2_CONTROLS_NOT_ALLOWED,
+                    "LDAPv2 clients are not allowed to use request controls");
 
 
 

--
Gitblit v1.10.0