Skip to content

Commit

Permalink
fix(encryption): respect user bson options when using autoEncryption
Browse files Browse the repository at this point in the history
Fixes NODE-2278
  • Loading branch information
daprahamian committed Nov 18, 2019
1 parent eee9b72 commit cb7a3f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/core/wireprotocol/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function _cryptCommand(server, ns, cmd, options, callback) {
return;
}

autoEncrypter.decrypt(response.result, (err, decrypted) => {
autoEncrypter.decrypt(response.result, options, (err, decrypted) => {
if (err) {
callback(err, null);
return;
Expand All @@ -179,7 +179,7 @@ function _cryptCommand(server, ns, cmd, options, callback) {
return;
}

autoEncrypter.encrypt(ns, cmd, (err, encrypted) => {
autoEncrypter.encrypt(ns, cmd, options, (err, encrypted) => {
if (err) {
callback(err, null);
return;
Expand Down

0 comments on commit cb7a3f7

Please sign in to comment.