Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unexpected NTLM message Type 3 in new connection" for POST requests after several seconds #12

Open
Woodham opened this issue Nov 8, 2012 · 8 comments

Comments

@Woodham
Copy link

Woodham commented Nov 8, 2012

I get the a "Unexpected NTLM message Type 3 in new connection" error when executing a POST request after an indeterminate amount of time on the same page.

The browser then requests a username and password, which doesn't work. (It just keeps requesting a username and password, and clicking cancel gives an unauthorized response).

This happens in Chrome, IE and Firefox.

GET requests all seem to work fine, however long you remain on the page before navigating to another one.

Example from logs:

[Thu Nov 08 10:11:42 2012] [info] [client 10.2.2.58] PYNTLM: Handling connection 0x4 from address 10.2.2.58 for POST URI /admin/general. 0 entries in connection cache., referer: http://iqa/admin/general
[Thu Nov 08 10:11:42 2012] [info] [client 10.2.2.58] PYTNLM: Spurious authentication request on connection 0x4. Method = POST. Content-Length = 0. Headers = {OMITTED}
[Thu Nov 08 10:11:42 2012] [info] [client 10.2.2.58] Unexpected NTLM message Type 3 in new connection from address 10.2.2.58 and URI /admin/general, referer: http://iqa/admin/general

@nueces
Copy link

nueces commented Nov 20, 2012

I'm having the same problem with POST request, there is a workaround or something in where I can help? traceback, logs, etc?

@ghost
Copy link

ghost commented Mar 4, 2013

Same problem here. Did either one of you manage to solve it?

@aliloubm
Copy link

aliloubm commented Apr 2, 2013

Same problem .... :/

@aliloubm
Copy link

aliloubm commented Apr 2, 2013

line 405 of pyntlm.py change

        if req.method!='POST' or req.clength>0:
            return apache.OK   

to
return apache.OK #if req.method!='POST' or req.clength>0:

I don't think it's a good idea but It works, just like that!

@JosefJezek
Copy link

I have same problem for post with absolute path.

ex. <form action="https://intranet/groups/create/step/group-details/" method="post">
Relative path is ok: 
<form action="/" method="post">

@mburtscher
Copy link

Same problem here, hack by @aliloubm "solves" the problem ...

@akovacs123
Copy link

It solved my problem, thanks for the hint. However, this is really out of my comfort zone, someone should make a correct solution and feed it back to the repository. :(

AlexH-HankIT pushed a commit to AlexH-HankIT/PyAuthenNTLM2 that referenced this issue Dec 28, 2016
@peternewman
Copy link

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

No branches or pull requests

7 participants