llbsolver: validate digest on load
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>docker-19.03
parent
eefe2e2f21
commit
07810f0aae
|
@ -186,7 +186,11 @@ func loadLLB(def *pb.Definition, fn func(digest.Digest, *pb.Op, func(digest.Dige
|
|||
if v, ok := cache[dgst]; ok {
|
||||
return v, nil
|
||||
}
|
||||
v, err := fn(dgst, allOps[dgst], rec)
|
||||
op, ok := allOps[dgst]
|
||||
if !ok {
|
||||
return nil, errors.Errorf("invalid missing input digest %s", dgst)
|
||||
}
|
||||
v, err := fn(dgst, op, rec)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue