fix invalid validation error checking
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
This commit is contained in:
parent
6ae90906ab
commit
014748bc04
@ -290,7 +290,7 @@ func validateContainer(container *containers.Container) error {
|
|||||||
|
|
||||||
// image has no validation
|
// image has no validation
|
||||||
for k, v := range container.Labels {
|
for k, v := range container.Labels {
|
||||||
if err := labels.Validate(k, v); err == nil {
|
if err := labels.Validate(k, v); err != nil {
|
||||||
return errors.Wrapf(err, "containers.Labels")
|
return errors.Wrapf(err, "containers.Labels")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -708,7 +708,7 @@ func (cs *contentStore) checkAccess(ctx context.Context, dgst digest.Digest) err
|
|||||||
|
|
||||||
func validateInfo(info *content.Info) error {
|
func validateInfo(info *content.Info) error {
|
||||||
for k, v := range info.Labels {
|
for k, v := range info.Labels {
|
||||||
if err := labels.Validate(k, v); err == nil {
|
if err := labels.Validate(k, v); err != nil {
|
||||||
return errors.Wrapf(err, "info.Labels")
|
return errors.Wrapf(err, "info.Labels")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user