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

Commit

Permalink
fix(srv-parsing): ensure parse options are propogated to txt lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Sep 24, 2018
1 parent 5d87044 commit 923ceb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/uri_parser.js
Expand Up @@ -124,7 +124,7 @@ function parseSrvConnectionString(uri, options, callback) {
connectionString += `?${connectionStringOptions.join('&')}`;
}

parseConnectionString(connectionString, callback);
parseConnectionString(connectionString, options, callback);
});
});
}
Expand Down
2 changes: 1 addition & 1 deletion test/tests/unit/mongodb_srv_spec_tests.js
Expand Up @@ -27,7 +27,7 @@ describe('mongodb+srv (spec)', function() {
it(test[1].comment, {
metadata: { requires: { topology: ['single'] } },
test: function(done) {
parseConnectionString(test[1].uri, (err, result) => {
parseConnectionString(test[1].uri, { caseTranslate: false }, (err, result) => {
if (test[1].error) {
expect(err).to.exist;
expect(result).to.not.exist;
Expand Down

3 comments on commit 923ceb0

@imsamurai
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbroadst seems after this change i get error "MongoError: not authorized on admin to execute command".
Db in url is differ than than authSource, after latest upgrade driver try to execute query in authSource instead of db specified in url.

@mbroadst
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@imsamurai can you please open a Jira ticket about this, and provide your connection string and example code to reproduce the issue?

@imsamurai
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.