Skip to content

Commit

Permalink
fix: concat called on undefined for empty MongoDB password
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltiunov committed Mar 14, 2019
1 parent 03497ee commit 7d75b1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/cubejs-mongobi-driver/driver/MongoBIDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ class MongoBIDriver extends BaseDriver {
user: process.env.CUBEJS_DB_USER,
password: process.env.CUBEJS_DB_PASS,
ssl: {
ssl: process.env.CUBEJS_DB_SSL
ssl: process.env.CUBEJS_DB_SSL
},
authSwitchHandler: (data, cb) => {
var buffer = Buffer.from(process.env.CUBEJS_DB_PASS.concat('\0'));
const buffer = Buffer.from((process.env.CUBEJS_DB_PASS || '').concat('\0'));
cb(null, buffer);
},
...config
Expand Down

0 comments on commit 7d75b1e

Please sign in to comment.