From 04655951047af125885bf74b43e2a029f90efb03 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Tue, 3 Sep 2024 12:53:37 -0400 Subject: [PATCH] move assertion to run-time error so that we don't crash when the admin mis-types something --- src/lib/server/tmpl_eval.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/server/tmpl_eval.c b/src/lib/server/tmpl_eval.c index b4ffe37cb1..dc5acbbdfb 100644 --- a/src/lib/server/tmpl_eval.c +++ b/src/lib/server/tmpl_eval.c @@ -1172,7 +1172,10 @@ int tmpl_eval_pair(TALLOC_CTX *ctx, fr_value_box_list_t *out, request_t *request break; default: - fr_assert(fr_type_is_leaf(vp->vp_type)); + if (!fr_type_is_leaf(vp->vp_type)) { + fr_strerror_const("Invalid data type for evaluation"); + goto fail; + } value = fr_value_box_alloc(ctx, vp->data.type, vp->da); if (!value) goto oom; -- 2.47.3