summaryrefslogtreecommitdiff
path: root/transport.h
diff options
context:
space:
mode:
authorAndreas Ericsson <ae@op5.se>2009-04-17 08:20:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-04-21 07:05:21 (GMT)
commit47abd85ba06ed7209d1caa3e5ac7cc6b232bece4 (patch)
treeb8d5bde85778454775769c6d5cfa680cb9615916 /transport.h
parent66996ecc28f001d3dcc73090717bb8c6e47c0d75 (diff)
downloadgit-47abd85ba06ed7209d1caa3e5ac7cc6b232bece4.zip
git-47abd85ba06ed7209d1caa3e5ac7cc6b232bece4.tar.gz
git-47abd85ba06ed7209d1caa3e5ac7cc6b232bece4.tar.bz2
fetch: Strip usernames from url's before storing them
When pulling from a remote, the full URL including username is by default added to the commit message. Since it adds very little value but could be used by malicious people to glean valid usernames (with matching hostnames), we're far better off just stripping the username before storing the remote URL locally. Note that this patch has no lasting visible effect when "git pull" does not create a merge commit. It simply alters what gets written to .git/FETCH_HEAD, which is used by "git merge" to automagically create its messages. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport.h')
-rw-r--r--transport.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/transport.h b/transport.h
index b1c2252..27bfc52 100644
--- a/transport.h
+++ b/transport.h
@@ -74,5 +74,6 @@ const struct ref *transport_get_remote_refs(struct transport *transport);
int transport_fetch_refs(struct transport *transport, const struct ref *refs);
void transport_unlock_pack(struct transport *transport);
int transport_disconnect(struct transport *transport);
+char *transport_anonymize_url(const char *url);
#endif