We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4a3f525 + 0f7752d commit fb384c9Copy full SHA for fb384c9
lib/nano.js
@@ -60,6 +60,13 @@ module.exports = exports = nano = function dbScope(cfg) {
60
return db;
61
}
62
63
+
64
+ function scrub(str) {
65
+ if (str) {
66
+ str = str.replace(/\/\/(.*)@/,"//XXXXXX:XXXXXX@");
67
+ }
68
+ return str;
69
70
71
function relax(opts, callback) {
72
if (typeof opts === 'function') {
@@ -224,6 +231,13 @@ module.exports = exports = nano = function dbScope(cfg) {
224
231
// fix cloudant issues where they give an erlang stacktrace as js
225
232
delete parsed.stack;
226
233
234
+ // scrub credentials
235
+ req.uri = scrub(req.uri);
236
+ rh.uri = scrub(rh.uri);
237
+ if (req.headers.cookie) {
238
+ req.headers.cookie = "XXXXXXX";
239
240
227
241
callback(errs.merge({
228
242
message: 'couch returned ' + rh.statusCode,
229
243
scope: 'couch',
0 commit comments