Skip to content

Commit b80e400

Browse files
committed
Now making sure to fall-back to using the NT
challenge response for the LM challenge response field when an LM challenge response isn't calculated
1 parent 5da8f81 commit b80e400

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

src/Robin/Ntlm/Message/NtlmV1AuthenticateMessageEncoder.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,20 +196,22 @@ public function encode(
196196
}
197197
}
198198

199-
if (null !== $lm_hash && $calculate_lm_response) {
200-
$lm_challenge_response = $this->calculateLmResponse(
201-
$lm_hash,
199+
if (null !== $nt_hash && $calculate_nt_response) {
200+
$nt_challenge_response = $this->calculateNtResponse(
201+
$nt_hash,
202202
$client_challenge,
203203
$server_challenge_nonce
204204
);
205205
}
206206

207-
if (null !== $nt_hash && $calculate_nt_response) {
208-
$nt_challenge_response = $this->calculateNtResponse(
209-
$nt_hash,
207+
if (null !== $lm_hash && $calculate_lm_response) {
208+
$lm_challenge_response = $this->calculateLmResponse(
209+
$lm_hash,
210210
$client_challenge,
211211
$server_challenge_nonce
212212
);
213+
} else {
214+
$lm_challenge_response = $nt_challenge_response;
213215
}
214216

215217
// TODO: Generate an encrypted random session key

0 commit comments

Comments
 (0)