Avoid logging creds on couch_replicator termination
When couch_replicator terminates with an error we log the #rep
record which can contain credentials for the source or target
of a replication, either in the url directly or in an Authorization
header.
This commit adds a function to strip credentials from the #httpdb
records in the #rep record and replace them with ****.
Specifically this concerns the url and headers fields of the
#rep.source and #rep.target #httpdb records.
We also add the format_status/2 callback and strip creds from the
#rep_state record in the gen_server state to prevent the creds
in the state getting logged in the event of a crash.
Closes COUCHDB-2949
This closes #25
1 file changed