]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
ensure an empty string has a value
authorAlan T. DeKok <aland@freeradius.org>
Sat, 5 Apr 2025 13:10:42 +0000 (09:10 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 5 Apr 2025 13:10:42 +0000 (09:10 -0400)
src/lib/unlang/edit.c

index 7f436736fbddec239655abe27d93b5865f40b13b..9e15bd8a53dda8c79abd1c314119507ed68c2757 100644 (file)
@@ -663,11 +663,14 @@ static int apply_edits_to_leaf(request_t *request, unlang_frame_state_edit_t *st
                         *
                         *      We have to check this here, because the quote is part of the tmpl, and we call
                         *      xlat_push(), which doesn't know about the quote.
+                        *
+                        *      @todo - we should really push the quote into the xlat, too.
                         */
                        box = fr_value_box_list_head(&current->rhs.result);
 
                        if (!box) {
                                MEM(box = fr_value_box_alloc(state, FR_TYPE_STRING, NULL));
+                               fr_value_box_strdup(box, box, NULL, "", false);
                                fr_value_box_list_insert_tail(&current->rhs.result, box);
 
                        } else if (fr_value_box_list_concat_in_place(box, box, &current->rhs.result, FR_TYPE_STRING,