From: Alan T. DeKok Date: Fri, 18 Nov 2022 13:16:52 +0000 (-0500) Subject: compile-time error for things which aren't supported X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90455a4913e3be92a706bd46ae9be023aa0ea695;p=thirdparty%2Ffreeradius-server.git compile-time error for things which aren't supported --- diff --git a/src/lib/unlang/compile.c b/src/lib/unlang/compile.c index 0961cbf7aca..43f25b10c70 100644 --- a/src/lib/unlang/compile.c +++ b/src/lib/unlang/compile.c @@ -1543,6 +1543,11 @@ static unlang_t *compile_update_to_edit(unlang_t *parent, unlang_compile_t *unla rcode = edit_section_alloc(group, &child, list, T_OP_SUB_EQ); if (rcode < 0) break; + if (strchr(attr, '[') != 0) { + cf_log_err(cp, "Cannot do filtering with array indexes"); + return NULL; + } + snprintf(buffer, sizeof(buffer), "&%s", attr); rcode = edit_pair_alloc(child, cp, buffer, op, value); break;