From 4baece95779dd46a3a59d59d1b7aa5958cf6117d Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 05 Nov 2015 12:25:29 +0000
Subject: [PATCH] OPENDJ-1802 Make ByteString methods more intentional
---
opendj-server-legacy/src/main/java/org/opends/server/tools/LDAPAuthenticationHandler.java | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tools/LDAPAuthenticationHandler.java b/opendj-server-legacy/src/main/java/org/opends/server/tools/LDAPAuthenticationHandler.java
index 47c51ff..26a03ef 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/tools/LDAPAuthenticationHandler.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/tools/LDAPAuthenticationHandler.java
@@ -567,7 +567,7 @@
}
else
{
- saslCredentials = ByteString.valueOf(trace);
+ saslCredentials = ByteString.valueOfUtf8(trace);
}
BindRequestProtocolOp bindRequest =
@@ -908,7 +908,7 @@
// Create and send the second bind request to the server.
BindRequestProtocolOp bindRequest2 =
new BindRequestProtocolOp(bindDN.toByteString(),
- SASL_MECHANISM_CRAM_MD5, ByteString.valueOf(buffer.toString()));
+ SASL_MECHANISM_CRAM_MD5, ByteString.valueOfUtf8(buffer.toString()));
LDAPMessage requestMessage2 =
new LDAPMessage(nextMessageID.getAndIncrement(), bindRequest2,
requestControls);
@@ -1652,7 +1652,7 @@
BindRequestProtocolOp bindRequest2 =
new BindRequestProtocolOp(bindDN.toByteString(),
SASL_MECHANISM_DIGEST_MD5,
- ByteString.valueOf(credBuffer.toString()));
+ ByteString.valueOfUtf8(credBuffer.toString()));
LDAPMessage requestMessage2 =
new LDAPMessage(nextMessageID.getAndIncrement(), bindRequest2,
requestControls);
@@ -2874,7 +2874,7 @@
credBuffer.append(bindPassword.toString());
ByteString saslCredentials =
- ByteString.valueOf(credBuffer.toString());
+ ByteString.valueOfUtf8(credBuffer.toString());
BindRequestProtocolOp bindRequest =
new BindRequestProtocolOp(bindDN.toByteString(), SASL_MECHANISM_PLAIN,
saslCredentials);
--
Gitblit v1.10.0