Merge pull request #13803 from tdakkota/fix/validate-label-join-dest-label

promql: validate `label_join` destination label
This commit is contained in:
Bryan Boreham 2024-03-23 09:02:11 +01:00 committed by GitHub
commit bb62e3f808
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1386,6 +1386,9 @@ func (ev *evaluator) evalLabelJoin(args parser.Expressions) (parser.Value, annot
}
srcLabels[i-3] = src
}
if !model.LabelName(dst).IsValid() {
panic(fmt.Errorf("invalid destination label name in label_join(): %s", dst))
}
val, ws := ev.eval(args[0])
matrix := val.(Matrix)