]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
print trailing quote, too
authorAlan T. DeKok <aland@freeradius.org>
Sun, 6 Feb 2022 22:38:09 +0000 (17:38 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 6 Feb 2022 22:38:09 +0000 (17:38 -0500)
src/lib/unlang/xlat_tokenize.c

index 1473dc995e4bd156fef4fe57a9b0c6f1f961c63d..8e1e80fcc9e64ad6508797c714fd16a0855ec751 100644 (file)
@@ -1156,7 +1156,10 @@ ssize_t xlat_print_node(fr_sbuff_t *out, xlat_exp_t const *head, fr_sbuff_escape
                        if (node->vpt->quote != T_BARE_WORD) {
                                FR_SBUFF_IN_CHAR_RETURN(out, fr_token_quote[node->vpt->quote]);
                        }
-                       FR_SBUFF_IN_STRCPY_RETURN(out, node->vpt->name);
+                       FR_SBUFF_IN_STRCPY_RETURN(out, node->vpt->name); /* @todo - escape it? */
+                       if (node->vpt->quote != T_BARE_WORD) {
+                               FR_SBUFF_IN_CHAR_RETURN(out, fr_token_quote[node->vpt->quote]);
+                       }
                        goto done;
                }
                if (tmpl_is_xlat(node->vpt)) {