Skip to content

Commit 39049b3

Browse files
author
Prince Rachit Sinha
committed
[image-builder] Fix broken credential split
1 parent d00cc47 commit 39049b3

File tree

2 files changed

+3
-2
lines changed
  • components

2 files changed

+3
-2
lines changed

components/image-builder-bob/pkg/proxy/auth.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ func (a MapAuthorizer) AddIfNotExists(other MapAuthorizer) MapAuthorizer {
6161
}
6262
for k, v := range other {
6363
if _, ok := a[k]; ok {
64+
log.Infof("Skip adding key: %s to MapAuthorizer as it already exists", k)
6465
continue
6566
}
6667
res[k] = v

components/image-builder-mk3/pkg/auth/auth.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ func (a AllowedAuthFor) additionalAuth(domain string) *Authentication {
208208
dec, err := base64.StdEncoding.DecodeString(ath)
209209
if err == nil {
210210
segs := strings.Split(string(dec), ":")
211-
if len(segs) == 2 {
211+
if len(segs) > 1 {
212212
res.Username = segs[0]
213-
res.Password = segs[1]
213+
res.Password = strings.Join(segs[1:], ":")
214214
}
215215
}
216216
return res

0 commit comments

Comments
 (0)