Skip to content

Commit 13c6072

Browse files
authored
docs(NODE-4990): comment about serverNonce format (#3547)
1 parent c2da84e commit 13c6072

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cmap/auth/mongodb_aws.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,10 @@ export class MongoDBAWS extends AuthProvider {
108108
return;
109109
}
110110

111-
// TODO(NODE-4990)
112111
if (!ByteUtils.equals(serverNonce.subarray(0, nonce.byteLength), nonce)) {
112+
// throw because the serverNonce's leading 32 bytes must equal the client nonce's 32 bytes
113+
// https://github.com/mongodb/specifications/blob/875446db44aade414011731840831f38a6c668df/source/auth/auth.rst#id11
114+
113115
// TODO(NODE-3483)
114116
callback(new MongoRuntimeError('Server nonce does not begin with client nonce'));
115117
return;

0 commit comments

Comments
 (0)