Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
fix(uri_parser): use admin as default auth.db
Browse files Browse the repository at this point in the history
Fixes NODE-1635
  • Loading branch information
kvwalker authored and mbroadst committed Sep 5, 2018
1 parent 956d5a2 commit 345e6af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/uri_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ function parseConnectionString(uri, options, callback) {
}

parsedOptions = Object.assign({}, parsedOptions, options);
const auth = { username: null, password: null, db: db && db !== '' ? qs.unescape(db) : null };
const auth = { username: null, password: null, db: db && db !== '' ? qs.unescape(db) : 'admin' };
if (cap[4].split('?')[0].indexOf('@') !== -1) {
return callback(new MongoParseError('Unescaped slash in userinfo section'));
}
Expand Down

0 comments on commit 345e6af

Please sign in to comment.