This repository has been archived by the owner on Jul 5, 2023. It is now read-only.
Password with @ char #125
Labels
Comments
Thanks for reporting. I'll take a look. |
This appears to be a bug in the MongoClient URI parser. Here's the Ruby version: auth = Mongo::URIParser.new('mongodb://foo:b%40r@localhost/admin').auths.first
auth[:password]
# => 'b%20r' Compared to creating the auth directly: auth = Mongo::MongoClient.new.add_auth('admin', 'foo', 'b@r', nil)
auth[:password]
# => 'b@r' Connecting via the URI doesn't work, but the direct auth does. And the same thing in PHP: $m = new MongoClient('mongodb://foo:b%40r@localhost/admin');
// => MongoConnectionException with message 'Failed to connect to: localhost:27017:
// Authentication failed on database 'admin' with username 'foo': auth fails' I'll file a bug with 10gen, but your best bet for now is to try to get your password changed :-/ |
I created an issue for the Ruby driver. It looks like there's already an open issue for the PHP driver. Searching their issue tracker, it looks like it's a common problem across most drivers. Feel free to 👍 any of those issues :) |
As an update, the fix for this issue is in 1.x-stable and it will be in the next Mongo Ruby Driver release (1.9.2). |
Thanks for the quick fix, @TylerBrock |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'd like to use
genghis
to connect to a Mongo database. I got my credentials, but the password contains an@
char. When I try to add the DSN ongenghis
dashboard in the formuser:password@hostname
using%40
for the@
char it fails to connect.P.S. Unfortunately I cannot request a new password by now.
The text was updated successfully, but these errors were encountered: