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

Ludovic Poitou
19.26.2013 5e0a063bee0766042c2b1a68cca306737d65ecbd
Fix OPENDJ-819 : Malformed proxyAs arguments fail with ASN.1 decoding error.
This is just a one liner to use the proper error message (looks like a copy/paste mistake).
The error reported will now show as below:

$ ldapsearch -h localhost -p 1389 -D "uid=user.0,ou=people,dc=example,dc=com" -w password -Y "uid=user.1,ou=people,dc=example,dc=com" -b "dc=example,dc=com" 'uid=user.1'
SEARCH operation failed
Result Code: 2 (Protocol Error)
Additional Information: The authorization ID "uid=user.1,ou=people,dc=example,dc=com" contained in the proxied authorization V2 control is invalid because it does not start with "dn:" to indicate a user DN or "u:" to indicate a username
1 files modified
4 ■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/controls/ProxiedAuthV2Control.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/controls/ProxiedAuthV2Control.java
@@ -23,7 +23,7 @@
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Portions copyright 2011-2012 ForgeRock AS.
 *      Portions copyright 2011-2013 ForgeRock AS.
 */
package org.opends.server.controls;
import org.opends.messages.Message;
@@ -106,7 +106,7 @@
          }
          Message message =
              ERR_PROXYAUTH2_CANNOT_DECODE_VALUE.get(getExceptionMessage(e));
              ERR_PROXYAUTH2_INVALID_AUTHZID.get(lowerAuthZIDStr);
          throw new DirectoryException(ResultCode.PROTOCOL_ERROR, message,
              e);
        }