slen = xlat_tokenize_expression_internal(ctx, out, in, p_rules, t_rules, false);
if (slen < 0) return slen;
+ if (!*out) {
+ fr_strerror_const("Empty expressions are invalid");
+ return -1;
+ }
+
if (xlat_finalize(*out, t_rules->xlat.runtime_el) < 0) {
TALLOC_FREE(*out);
return -1;
slen = xlat_tokenize_expression_internal(ctx, out, in, p_rules, t_rules, true);
if (slen < 0) return slen;
+ if (!*out) {
+ fr_strerror_const("Empty conditions are invalid");
+ return -1;
+ }
+
if (xlat_finalize(*out, t_rules->xlat.runtime_el) < 0) {
TALLOC_FREE(*out);
return -1;
match ERROR offset 4: Zero length attribute name: Unresolved attributes are not allowed here
xlat %{%{} || }
-match ERROR offset 5: Empty expression is invalid
+match ERROR offset 5: Empty expressions are invalid
xlat %{%{} || foo}
-match ERROR offset 5: Empty expression is invalid
+match ERROR offset 5: Empty expressions are invalid
xlat %{%{User-Name} ||
match ERROR offset 19: Empty attribute reference
match ERROR offset 3: Missing closing brace
xlat %{}
-match ERROR offset 3: Empty expression is invalid
+match ERROR offset 3: Empty expressions are invalid
xlat %{:}
match ERROR offset 3: Zero length attribute name: Unresolved attributes are not allowed here