Skip to content

Find, verify, and analyze leaked credentials

Only add trailing slash when endpoint populated (#120)

Bill Rich6ed01500f8ea
diff --git a/pkg/sources/gitlab/gitlab.go b/pkg/sources/gitlab/gitlab.go
index 893f0ce4d..179de6d4b 100644
--- a/pkg/sources/gitlab/gitlab.go
+++ b/pkg/sources/gitlab/gitlab.go
@@ -76,7 +76,7 @@ func (s *Source) Init(aCtx context.Context, name string, jobId, sourceId int64,
s.repos = conn.Repositories
s.url = conn.Endpoint
- if !strings.HasSuffix(s.url, "/") {
+ if conn.Endpoint != "" && !strings.HasSuffix(s.url, "/") {
s.url = s.url + "/"
}
switch cred := conn.GetCredential().(type) {