diff options
Diffstat (limited to 'src/couchdb/couch_rep.erl')
-rw-r--r-- | src/couchdb/couch_rep.erl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/couchdb/couch_rep.erl b/src/couchdb/couch_rep.erl index 3daf8170..6be37f0b 100644 --- a/src/couchdb/couch_rep.erl +++ b/src/couchdb/couch_rep.erl @@ -350,10 +350,16 @@ close_db(Db) -> couch_db:close(Db). dbname(#http_db{url = Url}) -> - Url; + strip_password(Url); dbname(#db{name = Name}) -> Name. +strip_password(Url) -> + re:replace(Url, + "http(s)?://([^:]+):[^@]+@(.*)$", + "http\\1://\\2:*****@\\3", + [{return, list}]). + dbinfo(#http_db{} = Db) -> {DbProps} = couch_rep_httpc:request(Db), [{list_to_atom(?b2l(K)), V} || {K,V} <- DbProps]; |