From cd94108d28485a1326df238ec85fecea79ab9c9d Mon Sep 17 00:00:00 2001 From: Pascal Hofmann Date: Sun, 12 Apr 2020 23:21:58 +0200 Subject: [PATCH] Support authentication with passwords that contain a colon (#41) Co-authored-by: Pascal Hofmann --- client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.go b/client.go index f152fe9..85197c9 100644 --- a/client.go +++ b/client.go @@ -29,7 +29,7 @@ func New(auth, baseURL string) (*Client, error) { } key := "" if strings.Contains(auth, ":") { - split := strings.Split(auth, ":") + split := strings.SplitN(auth, ":", 2) u.User = url.UserPassword(split[0], split[1]) } else { key = fmt.Sprintf("Bearer %s", auth)