From 517e64778f36d0a251ad93a9e09d9fc1def52762 Mon Sep 17 00:00:00 2001 From: "Gary D. Gregory" Date: Wed, 27 Jan 2016 08:34:23 +0000 Subject: [PATCH] [HTTPCLIENT-1715] NTLMEngineImpl.Type1Message not thread safe but declared as a constant. git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.5.x@1726957 13f79535-47bb-0310-9956-ffa450edef68 --- RELEASE_NOTES.txt | 2 ++ .../main/java/org/apache/http/impl/auth/NTLMEngineImpl.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt index 08c2a3900..30cc6af3d 100644 --- a/RELEASE_NOTES.txt +++ b/RELEASE_NOTES.txt @@ -11,6 +11,8 @@ Changelog: * [HTTPCLIENT-1714] Add HttpClientBuilder.setDnsResolver(DnsResolver). Contributed by Alexis Thaveau +* [HTTPCLIENT-1715] NTLMEngineImpl.Type1Message not thread safe but declared as a constant. + Contributed by Olivier Lafontaine , Gary Gregory Release 4.5.1 diff --git a/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java b/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java index 0926e2c09..890f6474c 100644 --- a/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java +++ b/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java @@ -98,7 +98,7 @@ final class NTLMEngineImpl implements NTLMEngine { SIGNATURE[bytesWithoutNull.length] = (byte) 0x00; } - private static final Type1Message TYPE_1_MESSAGE = new Type1Message(); + private static final String TYPE_1_MESSAGE = new Type1Message().getResponse(); /** * Returns the response for the given message. @@ -145,7 +145,7 @@ final class NTLMEngineImpl implements NTLMEngine { static String getType1Message(final String host, final String domain) throws NTLMEngineException { // For compatibility reason do not include domain and host in type 1 message //return new Type1Message(domain, host).getResponse(); - return TYPE_1_MESSAGE.getResponse(); + return TYPE_1_MESSAGE; } /**