SamDecrock / node-http-ntlm

Node.js module to authenticate using HTTP NTLM
MIT License
192 stars 89 forks source link

No error check while sending type1 message to server. #29

Closed meteormanaged closed 7 years ago

meteormanaged commented 9 years ago

httpntlm.js - line 50

httpreq.get(options.url, type1options, $);

The above appears to make the assumption of a certain type of response but will not bark under certain conditions or responses such as:

[Error: DEPTH_ZERO_SELF_SIGNED_CERT]

This would be the default response generated attempting to connect to a server with a self signed certificate (which could very well be expected in a dev environment).

Connecting to a server with a self signed certificate and replacing the above code with the following will show you the error:

httpreq.get(options.url, type1options, function(err, res){
            if(err) console.dir(err);
        });

Not sure how you're passing errors or know enough aboust async to pull, methinks. I'll try playing with it.

SamDecrock commented 8 years ago

Do you want the error [Error: DEPTH_ZERO_SELF_SIGNED_CERT] to be ignored?

SamDecrock commented 7 years ago

This was fixed in commit ae14803c4331633e412073160b1886810afe9058