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; } /**