Skip to content

urlencode mongo password #748

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

Merged

Conversation

timemachine3030
Copy link
Contributor

No description provided.

@jenssegers
Copy link
Contributor

@timemachine3030 Do you know if there is an alternate way of passing credentials?

jenssegers added a commit that referenced this pull request Feb 24, 2016
@jenssegers jenssegers merged commit cee66ee into mongodb:master Feb 24, 2016
@rjvandoesburg
Copy link
Contributor

@jenssegers Hey, so by a coincidence I was having credential problems and I stumbled upon this ticket. I had a @ in my password that caused a problem (see password parameter here: http://uk3.php.net/manual/en/mongoclient.construct.php) I know this is deprecated but it seems the problem persists in the newer driver.

The new manager seems to still accept the same parameters (or at least the credentials)

So to answer the question you asked @timemachine3030 yes, there is an alternative way to pass the credentials, even other parameters.

I've have made some changes locally and am willing to put up a pull request but we might want to expand the parameters. What are your thoughts on this?

See the diff of the change I've made so far: rjvandoesburg@2948b71
and rjvandoesburg@f3c646e

@jenssegers
Copy link
Contributor

If that works, please send the PR!

@rjvandoesburg
Copy link
Contributor

Actually, silly old me (only actually started using your project today) this is already possible.
See: rjvandoesburg@eaf2b8f

By adding the credentials to options in the config they are automatically passed as extra options in the MongoDB constructor :)

However this change will cause problems when people update because the config needs to be updated.

mnphpexpert added a commit to mnphpexpert/laravel-mongodb that referenced this pull request Sep 2, 2024
…connection-string

Urlencode mongo password
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

Successfully merging this pull request may close these issues.

3 participants