From c75ac39d4c55bba70c8ab460fa64a0d42b1c09e4 Mon Sep 17 00:00:00 2001 From: Scisco Date: Thu, 27 Aug 2015 11:31:54 -0400 Subject: [PATCH] removed mongodbUrl from logs Having mongo db url with its user/pass in the logs is a big security risk --- lib/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index c020ad5..fb123b7 100644 --- a/lib/index.js +++ b/lib/index.js @@ -23,12 +23,12 @@ options = Hoek.applyToDefaults(defaults, options); Hoek.assert(options.mongodbUrl, 'Missing required mongodbUrl property in options.'); startDb = function() { - server.log(['plugin', 'info', 'hapi-mongoose-db-connector'], "Mongoose connecting to " + options.mongodbUrl); + server.log(['plugin', 'info', 'hapi-mongoose-db-connector'], "Mongoose connecting to MongoDB"); return mongoose.connect(options.mongodbUrl, options.mongoOptions, function(err) { if (err) { return server.log(['plugin', 'error', 'fatal', 'hapi-mongoose-db-connector'], "Mongoose connection failure"); } else { - return server.log(['plugin', 'info', 'hapi-mongoose-db-connector'], "Mongoose connected to " + options.mongodbUrl); + return server.log(['plugin', 'info', 'hapi-mongoose-db-connector'], "Mongoose connected to MongoDB"); } }); };