promql: validate `label_join` destination label

Signed-off-by: tdakkota <tanc13@yandex.ru>
pull/13803/head
tdakkota 8 months ago
parent a9a4fbafb0
commit f6834c347a
No known key found for this signature in database
GPG Key ID: 01A06F025C62F7CC

@ -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)

Loading…
Cancel
Save