Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Optionally URI decoding auth parts in Db.connect

  • Loading branch information...
commit 42e71b2fb1c5ab7c8882c5d1484323da5959024c 1 parent 3d4a880
@mrkurt mrkurt authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/mongodb/db.js
View
6 lib/mongodb/db.js
@@ -1715,6 +1715,12 @@ Db.connect = function(url, options, callback) {
var authPart = match[1] || '';
var auth = authPart.split(':', 2);
+ if(options['uri_decode_auth']){
+ auth[0] = decodeURIComponent(auth[0]);
+ if(auth[1]){
+ auth[1] = decodeURIComponent(auth[1]);
+ }
+ }
var hostPart = match[2];
var dbname = match[3] || 'default';
var urlOptions = (match[4] || '').split(/[&;]/);
Please sign in to comment.
Something went wrong with that request. Please try again.