diff options
author | Zachary Romero <zacromero3@gmail.com> | 2018-02-28 22:37:42 +0300 |
---|---|---|
committer | Zachary Romero <zacromero3@gmail.com> | 2018-02-28 22:37:42 +0300 |
commit | 7fd7090a73f623c74c9f26fe2fcfc8ef86131fe1 (patch) | |
tree | 33e114aa2fc4c41f8bfba724067293b551f3ccef /plumbing/transport/common.go | |
parent | 886dc83f3ed518a78772055497bcc7d7621b468e (diff) | |
download | go-git-7fd7090a73f623c74c9f26fe2fcfc8ef86131fe1.tar.gz |
plubming: transport, Escape the user and password for endpoint. Fixes #723
Signed-off-by: Zachary Romero <zacromero3@gmail.com>
Diffstat (limited to 'plumbing/transport/common.go')
-rw-r--r-- | plumbing/transport/common.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plumbing/transport/common.go b/plumbing/transport/common.go index cc9682f..f7b882b 100644 --- a/plumbing/transport/common.go +++ b/plumbing/transport/common.go @@ -128,10 +128,10 @@ func (u *Endpoint) String() string { buf.WriteString("//") if u.User != "" || u.Password != "" { - buf.WriteString(u.User) + buf.WriteString(url.PathEscape(u.User)) if u.Password != "" { buf.WriteByte(':') - buf.WriteString(u.Password) + buf.WriteString(url.PathEscape(u.Password)) } buf.WriteByte('@') |