Skip to content

Commit

Permalink
fix: config provided password not passed to server (#145)
Browse files Browse the repository at this point in the history
pass configured password to authSwitchHandler on MongoBIDrive
  • Loading branch information
richipargo authored and paveltiunov committed Jun 27, 2019
1 parent e6d6989 commit 4b1afb1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/cubejs-mongobi-driver/driver/MongoBIDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class MongoBIDriver extends BaseDriver {
password: process.env.CUBEJS_DB_PASS,
ssl,
authSwitchHandler: (data, cb) => {
const buffer = Buffer.from((process.env.CUBEJS_DB_PASS || '').concat('\0'));
const password = config.password || process.env.CUBEJS_DB_PASS || '';
const buffer = Buffer.from((password).concat('\0'));
cb(null, buffer);
},
...config
Expand Down

0 comments on commit 4b1afb1

Please sign in to comment.