From: Nick Porter Date: Fri, 18 Jul 2025 13:53:04 +0000 (+0100) Subject: Don't add FR_TYPE_NULL boxes to xlat output X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0440737a5638276146f3d052dbefc077653cfdc1;p=thirdparty%2Ffreeradius-server.git Don't add FR_TYPE_NULL boxes to xlat output They currently can't be cast to anything so cause issues when assigning to a target attribute --- diff --git a/src/modules/rlm_redis/rlm_redis.c b/src/modules/rlm_redis/rlm_redis.c index 6521d08d885..067d9f0184f 100644 --- a/src/modules/rlm_redis/rlm_redis.c +++ b/src/modules/rlm_redis/rlm_redis.c @@ -555,10 +555,12 @@ static xlat_action_t redis_lua_func_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out, if (vb_out->type == FR_TYPE_GROUP) { fr_value_box_t *child_vb = NULL; - while ((child_vb = fr_value_box_list_pop_head(&vb_out->vb_group))) fr_dcursor_append(out, child_vb); + while ((child_vb = fr_value_box_list_pop_head(&vb_out->vb_group))) { + if (child_vb->type != FR_TYPE_NULL) fr_dcursor_append(out, child_vb); + } talloc_free(vb_out); } else { - fr_dcursor_append(out, vb_out); + if (vb_out->type != FR_TYPE_NULL) fr_dcursor_append(out, vb_out); } finish: @@ -774,10 +776,12 @@ reply_parse: if (vb_out->type == FR_TYPE_GROUP) { fr_value_box_t *child_vb = NULL; - while ((child_vb = fr_value_box_list_pop_head(&vb_out->vb_group))) fr_dcursor_append(out, child_vb); + while ((child_vb = fr_value_box_list_pop_head(&vb_out->vb_group))) { + if (child_vb->type != FR_TYPE_NULL) fr_dcursor_append(out, child_vb); + } talloc_free(vb_out); } else { - fr_dcursor_append(out, vb_out); + if (vb_out->type != FR_TYPE_NULL) fr_dcursor_append(out, vb_out); } finish: