Skip to content
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

databaseURI with email and password causes error #79

Closed
omairvaiyani opened this issue Jan 30, 2016 · 2 comments
Closed

databaseURI with email and password causes error #79

omairvaiyani opened this issue Jan 30, 2016 · 2 comments

Comments

@omairvaiyani
Copy link
Contributor

Just tried setting up a local server and sent a curl request, received this error in console. Before giving more details, is there an obvious mistake that I could have made to cause this?

Uncaught internal server error. [Error: Username containing an unescaped at-sign] Error: Username containing an unescaped at-sign
    at module.exports (/Users/omairvaiyani/Documents/github/app-server/node_modules/parse-server/node_modules/mongodb/lib/url_parser.js:61:13)
    at connect (/Users/omairvaiyani/Documents/github/app-server/node_modules/parse-server/node_modules/mongodb/lib/mongo_client.js:125:16)
    at /Users/omairvaiyani/Documents/github/app-server/node_modules/parse-server/node_modules/mongodb/lib/mongo_client.js:101:7
    at Function.MongoClient.connect (/Users/omairvaiyani/Documents/github/app-server/node_modules/parse-server/node_modules/mongodb/lib/mongo_client.js:100:12)
    at /Users/omairvaiyani/Documents/github/app-server/node_modules/parse-server/ExportAdapter.js:38:24
    at process._tickCallback (node.js:368:9)

EDIT:
After looking into it, it seems that the way ExportAdapter connects with MongoClient doesn't account for authentication with email+password within the databaseURI parameter. How do we manage this as I haven't seen this in the migration docs?

@omairvaiyani omairvaiyani changed the title Uncaught Internal Server Error databaseURI with email and password causes error Jan 30, 2016
@mkpazon
Copy link

mkpazon commented Jan 30, 2016

I think you should be using the database username and not an email

@gfosco
Copy link
Contributor

gfosco commented Jan 30, 2016

Yeah I don't think it's valid to have an email address to sign in to mongo, especially since it's constructed like a URL. protocol://user:pass@server/database. The @ sign in the email would be misinterpreted as the break between authentication and server address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants