Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1715

NTLMEngineImpl.Type1Message not thread safe but declared as a constant

    XMLWordPrintableJSON

Details

    Description

      NTLMEngineImpl declares a static final member named TYPE_1_MESSAGE of type Type1Message. Members of Type1Message are final and do not change, but that is not the case for members of its superclass NTLMMessage.

      Whenever the method NTLMEngineImpl#getType1Message(String, String) is called, the method NTLMMessage#getResponse() get called on the TYPE_1_MESSAGE instance and this modifies the following members of NTLMMessage:

      • messageContents
      • currentOutputPosition

      This is not thread safe and we get exceptions as seen in HTTPCLIENT-1686.

      My guess is that the computed response string should be kept in a constant instead of a Type1Message instance.

      Attachments

        Issue Links

          Activity

            People

              ggregory Gary D. Gregory
              olafontaine@gmail.com Olivier Lafontaine
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: