1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #42046 from thaJeztah/20.10_labels_regex_length_check

[20.10 backport] Check the length of the correct variable #42039
This commit is contained in:
Tibor Vass 2021-02-23 10:00:58 -08:00 committed by GitHub
commit dc1606ad79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,7 @@ func (info *Info) ExtraAttributes(keyMod func(string) string) (map[string]string
}
labelsRegex, ok := info.Config["labels-regex"]
if ok && len(labels) > 0 {
if ok && len(labelsRegex) > 0 {
re, err := regexp.Compile(labelsRegex)
if err != nil {
return nil, err