Skip to content

Commit cb7a3f7

Browse files
committed
fix(encryption): respect user bson options when using autoEncryption
Fixes NODE-2278
1 parent eee9b72 commit cb7a3f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/core/wireprotocol/command.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ function _cryptCommand(server, ns, cmd, options, callback) {
162162
return;
163163
}
164164

165-
autoEncrypter.decrypt(response.result, (err, decrypted) => {
165+
autoEncrypter.decrypt(response.result, options, (err, decrypted) => {
166166
if (err) {
167167
callback(err, null);
168168
return;
@@ -179,7 +179,7 @@ function _cryptCommand(server, ns, cmd, options, callback) {
179179
return;
180180
}
181181

182-
autoEncrypter.encrypt(ns, cmd, (err, encrypted) => {
182+
autoEncrypter.encrypt(ns, cmd, options, (err, encrypted) => {
183183
if (err) {
184184
callback(err, null);
185185
return;

0 commit comments

Comments
 (0)