Skip to content

Commit 82ddae6

Browse files
Update ntlm.js (#642)
Adding the suppression for the NTLM specification.
1 parent 39ea394 commit 82ddae6

File tree

1 file changed

+2
-2
lines changed
  • api/opensource/node-http-ntlm

1 file changed

+2
-2
lines changed

api/opensource/node-http-ntlm/ntlm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ function binaryArray2bytes(array){
339339
function create_NT_hashed_password_v1(password){
340340
var buf = new Buffer(password, 'utf16le');
341341
var md4 = crypto.createHash('md4'); // CodeQL [SM04514] Required by NTLM v1 specification
342-
md4.update(buf);
342+
md4.update(buf); // CodeQL [SM01511] Required by NTLM v1 specification
343343
return new Buffer(md4.digest());
344344
}
345345

@@ -370,7 +370,7 @@ function ntlm2sr_calc_resp(responseKeyNT, serverChallenge, clientChallenge){
370370
clientChallenge.copy(lmChallengeResponse, 0, 0, clientChallenge.length);
371371

372372
var buf = Buffer.concat([serverChallenge, clientChallenge]);
373-
var md5 = crypto.createHash('md5');
373+
var md5 = crypto.createHash('md5'); // CodeQL [SM04514] Required by NTLM v2 specification
374374
md5.update(buf);
375375
var sess = md5.digest();
376376
var ntChallengeResponse = calc_resp(responseKeyNT, sess.slice(0,8));

0 commit comments

Comments
 (0)