Skip to content

Commit

Permalink
fix: correctly assign username to X509 auth command (#2587)
Browse files Browse the repository at this point in the history
A typo resulted in a provided username not being properly assigned to the command
send to the server when using X509 authentication.

NODE-2869
  • Loading branch information
through-a-haze authored Nov 6, 2020
1 parent c9f9d5e commit 9110a45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/auth/x509.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class X509 extends AuthProvider {
function x509AuthenticateCommand(credentials) {
const command = { authenticate: 1, mechanism: 'MONGODB-X509' };
if (credentials.username) {
Object.apply(command, { user: credentials.username });
Object.assign(command, { user: credentials.username });
}

return command;
Expand Down

0 comments on commit 9110a45

Please sign in to comment.