File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,13 @@ module.exports = exports = nano = function dbScope(cfg) {
60
60
return db ;
61
61
}
62
62
}
63
+
64
+ function scrub ( str ) {
65
+ if ( str ) {
66
+ str = str . replace ( / \/ \/ ( .* ) @ / , "//XXXXXX:XXXXXX@" ) ;
67
+ }
68
+ return str ;
69
+ }
63
70
64
71
function relax ( opts , callback ) {
65
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' ,
You can’t perform that action at this time.
0 commit comments