Skip to content

Commit

Permalink
Merge pull request #3810 from tonistiigi/v0.11.6-picks
Browse files Browse the repository at this point in the history
[v0.11] cherry-picks for v0.11.6
  • Loading branch information
tonistiigi committed Apr 20, 2023
2 parents 11a0070 + c48a6bc commit 2951a28
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions solver/llbsolver/proc/sbom.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ func SBOMProcessor(scannerRef string, useCache bool) llbsolver.Processor {
if !ok {
return nil, errors.Errorf("could not find ref %s", p.ID)
}
if ref == nil {
continue
}

defop, err := llb.NewDefinitionOp(ref.Definition())
if err != nil {
return nil, err
Expand Down
10 changes: 9 additions & 1 deletion util/resolver/authorizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,15 @@ func (ah *authHandler) fetchToken(ctx context.Context, sm *session.Manager, g se
if resp.ExpiresIn == 0 {
resp.ExpiresIn = defaultExpiration
}
issuedAt, expires = time.Unix(resp.IssuedAt, 0), int(resp.ExpiresIn)
expires = int(resp.ExpiresIn)
// We later check issuedAt.isZero, which would return
// false if converted from zero Unix time. Therefore,
// zero time value in response is handled separately
if resp.IssuedAt == 0 {
issuedAt = time.Time{}
} else {
issuedAt = time.Unix(resp.IssuedAt, 0)
}
token = resp.Token
return nil, nil
}
Expand Down

0 comments on commit 2951a28

Please sign in to comment.