pegasy / python-ntlm

Automatically exported from code.google.com/p/python-ntlm
0 stars 0 forks source link

Incorrect DomainNameBufferOffset/WorkstationBufferOffset values when DomainName/Workstation empty #42

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In ntlm.py create_NTLM_NEGOTIATE_MESSAGE

WorkstationBufferOffset = BODY_LENGTH when Workstation is empty (len=0)
DomainNameBufferOffset = BODY_LENGTH+WorkstationBufferOffset when DomainName is 
empty

When Workstation or DomainName value is empty, their corresponding BufferOffset 
values should be 0. Otherwise, server can respond with BAD REQUEST status code 
(this happens all the time in my case with some third-party webservice).

Attached patch fixes this issue.

Original issue reported on code.google.com by tadas.da...@gmail.com on 2 Oct 2013 at 1:52

Attachments: