Skip to content

Commit

Permalink
feat: UIS-285 mask urls which contain password or token query params
Browse files Browse the repository at this point in the history
  • Loading branch information
Georgi Alexandrov authored and kalinkrustev committed Nov 23, 2016
1 parent 0cad73e commit f102876
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ var lib = {
return '*****';
} else if (key === 'cookie' || key === 'utSessionId') {
return '*****' + ((typeof value === 'string') ? value.slice(-4) : '');
} else if (key === 'url' && typeof value === 'string' && (/password|(^pass$)|(^token$)/i).test(value)) {
return value.substring(0, value.search('?')) + '*****';
}
}
});
Expand Down

0 comments on commit f102876

Please sign in to comment.