mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
19.23.2011 4bf7d7c4a02bf5d16acf88579f2c0f376f3e4080
Fix OPENDJ-288: Use INVALID_CREDENTIALS result code when disconnecting users because their entry has been deleted
4 files modified
18 ■■■■■ changed files
opends/src/messages/messages/core.properties 2 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/core/AuthenticatedUsers.java 3 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java 3 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/types/DisconnectReason.java 10 ●●●●● patch | view | raw | blame | history
opends/src/messages/messages/core.properties
@@ -21,6 +21,7 @@
# CDDL HEADER END
#
#      Copyright 2006-2010 Sun Microsystems, Inc.
#      Portions copyright 2011 ForgeRock AS
@@ -1851,3 +1852,4 @@
SEVERE_WARN_OP_REJECTED_BY_QUEUE_INTERRUPT_740=The request to process this \
 operation has been rejected because request handler thread was interrupted \
 while attempting to put the operation on the work queue
INFO_DISCONNECT_DUE_TO_INVALID_CREDENTIALS_741=Invalid Credentials
opends/src/server/org/opends/server/core/AuthenticatedUsers.java
@@ -23,6 +23,7 @@
 *
 *
 *      Copyright 2008-2010 Sun Microsystems, Inc.
 *      Portions copyright 2011 ForgeRock AS
 */
package org.opends.server.core;
import java.util.HashSet;
@@ -234,7 +235,7 @@
        Message message = WARN_CLIENTCONNECTION_DISCONNECT_DUE_TO_DELETE.get(
                String.valueOf(entry.getDN()));
        conn.disconnect(DisconnectReason.OTHER, true, message);
        conn.disconnect(DisconnectReason.INVALID_CREDENTIALS, true, message);
      }
    }
  }
opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java
@@ -1091,6 +1091,9 @@
        case CONNECTION_REJECTED:
          resultCode = LDAPResultCode.CONSTRAINT_VIOLATION;
          break;
        case INVALID_CREDENTIALS:
          resultCode = LDAPResultCode.INVALID_CREDENTIALS;
          break;
        default:
          resultCode = LDAPResultCode.OTHER;
          break;
opends/src/server/org/opends/server/types/DisconnectReason.java
@@ -23,6 +23,7 @@
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Portions copyright 2011 ForgeRock AS
 */
package org.opends.server.types;
import org.opends.messages.Message;
@@ -117,6 +118,15 @@
  /**
   * The disconnect reason that indicates that the client connection was closed
   * because the bound user's entry is no longer accessible.
   */
  INVALID_CREDENTIALS(
          INFO_DISCONNECT_DUE_TO_INVALID_CREDENTIALS.get()),
  /**
   * The disconnect reason that indicates that the client connection
   * was closed because the maximum allowed request size was exceeded.
   */