Skip to content
This repository has been archived by the owner on Feb 7, 2019. It is now read-only.

fix ill formatted http Authorization string #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shi-yan
Copy link

@shi-yan shi-yan commented May 11, 2017

with python3, the NTLM Authorization string is of byte type.

when concatenating it with the prefix, python adds b'' around the authorization string.

for example, instead of generating:

Authorization: NTLM TlRMTVNTUAABAAAAB7IIogoACgAyBBBBCgAKACgBBBBFASgKAAAAD1NISVktUDlYNzlOVklESUEuQ09N

as would by python-ntlm,

python-ntlm3 generated:

Authorization: NTLM b'TlRMTVNTUAABAAAAB7IIogoACgAyBBBBCgAKACgBBBBFASgKAAAAD1NISVktUDlYNzlOVklESUEuQ09N'

this resulted in server rejection (http 400 bad request)

with python3, the NTLM Authorization string is of byte type.

when concatenate it with the prefix, python adds b'' around the authorization string.

for example, instead of generating:

Authorization: NTLM TlRMTVNTUAABAAAAB7IIogoACgAyBBBBCgAKACgBBBBFASgKAAAAD1NISVktUDlYNzlOVklESUEuQ09N

as would by python-ntlm,

python-ntlm3 generated:

Authorization: NTLM b'TlRMTVNTUAABAAAAB7IIogoACgAyBBBBCgAKACgBBBBFASgKAAAAD1NISVktUDlYNzlOVklESUEuQ09N'

this resulted in server rejection (http 400 bad request)
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.7%) to 93.41% when pulling 83288c0 on shi-yan:master into e660efe on trustrachel:master.

@shi-yan
Copy link
Author

shi-yan commented May 12, 2017

my change failed automation. I'm using ubuntu 16 with python 3.5. The failure was with python 3.3.

I don't have the environment to test it.

@thomas-reg
Copy link

This commit fixed my problem! It needs to be committed ASAP.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants