diff --git a/src/database/mongo.js b/src/database/mongo.js index 2d9ab4ee14..389a85bf7d 100644 --- a/src/database/mongo.js +++ b/src/database/mongo.js @@ -63,7 +63,7 @@ var usernamePassword = ''; if (nconf.get('mongo:username') && nconf.get('mongo:password')) { - usernamePassword = nconf.get('mongo:username') + ':' + nconf.get('mongo:password') + '@'; + usernamePassword = nconf.get('mongo:username') + ':' + encodeURIComponent(nconf.get('mongo:password')) + '@'; } // Sensible defaults for Mongo, if not set