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

Reserved characters in mongodb URL break parsing #27

Open
jfelten opened this issue Jan 26, 2021 · 1 comment
Open

Reserved characters in mongodb URL break parsing #27

jfelten opened this issue Jan 26, 2021 · 1 comment

Comments

@jfelten
Copy link

jfelten commented Jan 26, 2021

Special shell characters like '$' and '@' break the url parser when used like:

MONGO_URL="mongodb://[email protected]:PasswordWith$@host1:27017,host2:27017/reaction?replicaSet=rs0&readPreference=primaryPreferred&authSource=admin" npx migrator migrate

Characters must be escaped:

MONGO_URL="mongodb://user\@domain.com:PasswordWith\$@host1:27017,host2:27017/reaction?replicaSet=rs0&readPreference=primaryPreferred&authSource=admin" npx migrator migrate

As is the error message is confusing and vague. Can documentation and error messages to ask uses to verify this? A simple error message asking to check for this will save users a lot of time and confusion.

@loan-laux
Copy link

Thanks @jfelten. Can an admin move this issue to migrator?

@MohanNarayana MohanNarayana transferred this issue from reactioncommerce/api-migrations Aug 24, 2021
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

2 participants