-
Notifications
You must be signed in to change notification settings - Fork 2k
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
srv support in the connection url for sails-mongo #7344
Comments
@sereisoglu Thanks for posting! We'll take a look as soon as possible. In the mean time, there are a few ways you can help speed things along:
Please remember: never post in a public forum if you believe you've found a genuine security vulnerability. Instead, disclose it responsibly. For help with questions about Sails, click here. |
Thanks @sereisoglu, I'll follow up on this one to see if we can land a PR by the end of the week. cc @eashaw |
Hello, I’m here to shed some light on the issue. Compatibility with the +srv protocol was added years ago; I included it myself in a PR years back. The problem is with the Notice that the Personally, I wouldn’t delete the lowercase I hope it helps. |
Hey @Josebaseba this is very useful and with what you explained I think it will help land a fix for this sooner than I expect. I will submit a patch. In the spirit of making the smallest change to land this, I will add the |
Hey @sereisoglu thanks to @Josebaseba we've discovered this is a whitelist config options issue and I have made a PR to add the |
Hey @Josebaseba, @DominusKelvin, as I mentioned above, appName is available in both srv and non-srv urls, but since it only caused problems in srv urls, I thought the problem was that srv support was not available. Thanks for your comment, that was very informative @Josebaseba. Thanks for your PR and support @DominusKelvin. |
Sure thing @sereisoglu! |
Node version:
Sails version (sails): 1.5.11
ORM hook version (sails-hook-orm):
Sockets hook version (sails-hook-sockets):
Organics hook version (sails-hook-organics):
Grunt hook version (sails-hook-grunt):
Uploads hook version (sails-hook-uploads):
DB adapter & version (e.g. [email protected]): sails-mongo 2.1.1
Skipper adapter & version (e.g. [email protected]):
MongoDB version: 6.0
Hello, there is no srv support in the connection url for sails-mongo.
I shared the error message above. It says there is a problem with appName, but appName is found in the connection url with and without srv. It gives this error only for connection url with srv.
Connection url formats:
without srv: (this works with sails-mongo)
mongodb://admin:<password>@clusterName-shard-00-00.xxxxx.mongodb.net:27017,clusterName-shard-00-01.xxxxx.mongodb.net:27017,clusterName-shard-00-02.xxxxx.mongodb.net:27017/database?ssl=true&replicaSet=atlas-xxxxxx-shard-0&authSource=admin&retryWrites=true&w=majority&appName=clusterName
with srv: (this does not work with sails-mongo)
mongodb+srv://admin:<password>@clusterName.xxxxx.mongodb.net/database?retryWrites=true&w=majority&appName=clusterName
The text was updated successfully, but these errors were encountered: