Skip to content

Commit 29cd501

Browse files
authored
Merge pull request #1 from mcneely/master
Modified Regex
2 parents 1c2a88f + 42b5c64 commit 29cd501

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ntlm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ exports.challengeHeader = function (hostname, domain) {
226226
};
227227

228228
exports.responseHeader = function (res, url, domain, username, password) {
229-
var serverNonce = new Buffer((res.headers['www-authenticate'].match(/^NTLM\s+(.+?)(,|\s+)/) || [])[1], 'base64');
229+
var serverNonce = new Buffer((res.headers['www-authenticate'].match(/^NTLM\s+(.+?)(,|\s+|$)/) || [])[1], 'base64');
230230
var hostname = require('url').parse(url).hostname;
231231
return 'NTLM ' + exports.encodeType3(username, hostname, domain, exports.decodeType2(serverNonce), password).toString('base64')
232232
};

0 commit comments

Comments
 (0)