bobthecow / genghis

The single-file MongoDB admin app
http://genghisapp.com
MIT License
1.45k stars 165 forks source link

@ symbol in password causes a malformed server error. #171

Closed harlanhaskins closed 10 years ago

harlanhaskins commented 10 years ago

I have an @in my password, and cannot think of a way to escape that to avoid the malformed server error when typing in a server address using user:p@ss@server.tld/collection

I've tried escaping it (like \@) to no avail.

bobthecow commented 10 years ago

You have to URL encode it, since it's in a URL :)

%40

harlanhaskins commented 10 years ago

That...makes a lot of sense. Thanks!

It'd be nice if there was a popup saying to URL encode characters.

bobthecow commented 10 years ago

Note that there was a bug in the drivers for both PHP and Ruby at different points where it wouldn't deal very well with URL encoded things in the password. If you run into problems even after encoding it, you should make sure you have an updated driver installed.

bobthecow commented 10 years ago

And yes, more help would be helpful :)

I'm thinking putting it in the "malformed url" message would work well, since then it would only show up for people who need it?

harlanhaskins commented 10 years ago

That'd be great! Just check if they have any of the disallowed URL characters (or more than 1 @) and advise them to url encode. That'd be really nice.