New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow valid MongoDB connection strings #670

merged 1 commit into from Jun 8, 2018


None yet
4 participants

plusn-nuri commented Jun 7, 2018

Allow valid MongoDB connection string when attaching to a server.

Current code disallowed a connection string of the form mongodb+srv://yourhost/, even though it is a valid MongoDB connection string.

This pull request expands the validation code to allow connections that start with both mongodb:// and mongodb+srv://.

Other places in the code base account for and correctly parse the +srv variant, such as the code that parses database name from the connection URL.


This comment has been minimized.

msftclas commented Jun 7, 2018

CLA assistant check
All CLA requirements met.


Looks good.

It looks like the builds are failing due to some access permission issues in TravisCI. I haven't seen this issue before.

  1. We'll try to fix that soon, and verify that the tests pass
  2. I'll wait for another review before we merge. :)
// The module 'assert' provides assertion methods from node
import * as assert from 'assert';

This comment has been minimized.


StephenWeatherford Jun 8, 2018


I really appreciate your adding tests.

This comment has been minimized.


plusn-nuri Jun 8, 2018


You're welcome!

@StephenWeatherford StephenWeatherford merged commit 2fb1060 into Microsoft:master Jun 8, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
license/cla All CLA requirements met.

This comment has been minimized.


StephenWeatherford commented Jun 8, 2018

I restarted the build and it passed, so I've merged. We'll really appreciate your contribution. It will show up in the next public release, which will likely be in 2-3 weeks.

Stephen and Prashanth

PrashanthCorp added a commit that referenced this pull request Jun 8, 2018

Cherry pick + Prep for 0.7.2 (#678)
* find operation: Use EJSON to parse query and projection (#635)

* Allow MongoDB connection of the form 'mongodb+srv://...' (#670)

* Merge commit

* Prep for release 0.7.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment