Files
kami-parse-server/src
Benjamin Woodruff a30c81745a Add URI encoding to mongo auth parameters
The mongodb driver requires auth values be URI encoded:
044063097d

This uses node's built-in url module to encode the auth portion, by
parsing and re-formatting it, which causes special characters to get URI
encoded properly:
https://nodejs.org/api/url.html#url_escaped_characters

This is all a bit silly since mongodb just takes our passed uri, and
runs it through the same url parser again, but not before explicitly
erroring on '@' characters in the uri.

This is similiar to #148 (reverted by #297), but with much less code,
and hopefully less breakage. Also, note that `uri_decode_auth` is no
longer needed. That was removed in the above referenced
node-mongodb-native commit.

I've tested this on usernames and passwords with @, !, +, and a space.

Presumably this would also work with usernames and passwords that are
already URI encoded (since parseUrl will simply unescape it, and
formatUrl will escape it again).
2016-03-16 14:31:44 -07:00
..
2016-03-11 19:29:51 -05:00
2016-02-11 12:28:45 -08:00
2016-02-09 10:23:55 +01:00
2016-02-21 01:52:53 -08:00
2016-03-02 16:16:16 -08:00
2016-02-09 10:23:55 +01:00
2016-03-01 17:11:23 -05:00