Skip to content

Commit

Permalink
fix: assignment to nil map (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
leonsteinhaeuser authored Apr 29, 2024
1 parent 6c19201 commit bde29c6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/util/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ func UpdateSecret(ctx context.Context, clnt *passbolt.Client, scheme *runtime.Sc
}
}

// TODO: normally this should not be necessary because we already assigned an empty map
// TODO: for some reason, it is necessary to check if the map is nil at this point
if secret.Data == nil {
secret.Data = make(map[string][]byte)
}

switch {
// check if field is set
// if field is set, get field value from passbolt secret and set it as kubernetes secret value
Expand Down

0 comments on commit bde29c6

Please sign in to comment.