diff options
author | Lokesh Mandvekar <lsm5@fedoraproject.org> | 2022-03-24 10:19:25 -0400 |
---|---|---|
committer | Lokesh Mandvekar <lsm5@fedoraproject.org> | 2022-03-24 10:19:25 -0400 |
commit | 4ce9d2078a531e071d90a8a8cbf98da5526ac752 (patch) | |
tree | 2c822195424c2a9bd9e485c4266d0da0b3434441 /vendor/github.com/prometheus/common/expfmt | |
parent | 19c80199a9973be16cc7c8a5c664a18b179f0179 (diff) | |
download | podman-4ce9d2078a531e071d90a8a8cbf98da5526ac752.tar.gz podman-4ce9d2078a531e071d90a8a8cbf98da5526ac752.tar.bz2 podman-4ce9d2078a531e071d90a8a8cbf98da5526ac752.zip |
Bump github.com/prometheus/client_golang to v1.11.1
Resolves: CVE-2022-21698
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
Diffstat (limited to 'vendor/github.com/prometheus/common/expfmt')
-rw-r--r-- | vendor/github.com/prometheus/common/expfmt/decode.go | 2 | ||||
-rw-r--r-- | vendor/github.com/prometheus/common/expfmt/text_parse.go | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/vendor/github.com/prometheus/common/expfmt/decode.go b/vendor/github.com/prometheus/common/expfmt/decode.go index c092723e8..7657f841d 100644 --- a/vendor/github.com/prometheus/common/expfmt/decode.go +++ b/vendor/github.com/prometheus/common/expfmt/decode.go @@ -164,7 +164,7 @@ func (sd *SampleDecoder) Decode(s *model.Vector) error { } // ExtractSamples builds a slice of samples from the provided metric -// families. If an error occurrs during sample extraction, it continues to +// families. If an error occurs during sample extraction, it continues to // extract from the remaining metric families. The returned error is the last // error that has occurred. func ExtractSamples(o *DecodeOptions, fams ...*dto.MetricFamily) (model.Vector, error) { diff --git a/vendor/github.com/prometheus/common/expfmt/text_parse.go b/vendor/github.com/prometheus/common/expfmt/text_parse.go index 342e5940d..b6079b31e 100644 --- a/vendor/github.com/prometheus/common/expfmt/text_parse.go +++ b/vendor/github.com/prometheus/common/expfmt/text_parse.go @@ -299,6 +299,17 @@ func (p *TextParser) startLabelName() stateFn { p.parseError(fmt.Sprintf("expected '=' after label name, found %q", p.currentByte)) return nil } + // Check for duplicate label names. + labels := make(map[string]struct{}) + for _, l := range p.currentMetric.Label { + lName := l.GetName() + if _, exists := labels[lName]; !exists { + labels[lName] = struct{}{} + } else { + p.parseError(fmt.Sprintf("duplicate label names for metric %q", p.currentMF.GetName())) + return nil + } + } return p.startLabelValue } |