From 455f17905f82a9a945b0ddd8a1b134c3957a0c34 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Sun, 15 Oct 2023 13:44:56 -0400 Subject: [PATCH] use correct API fr_value_box_aprint() does not print quotation characters around strings, even if escaping rules are passed to it. Instead, we need to call fr_value_box_aprint_quoted(), which will do the right thing. --- src/modules/rlm_cache/serialize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/rlm_cache/serialize.c b/src/modules/rlm_cache/serialize.c index 107ff6413732..735ca3fe9d00 100644 --- a/src/modules/rlm_cache/serialize.c +++ b/src/modules/rlm_cache/serialize.c @@ -74,7 +74,7 @@ int cache_serialize(TALLOC_CTX *ctx, char **out, rlm_cache_entry_t const *c) goto error; } - fr_value_box_aprint(value_pool, &value, tmpl_value(map->rhs), &fr_value_escape_single); + fr_value_box_aprint_quoted(value_pool, &value, tmpl_value(map->rhs), T_DOUBLE_QUOTED_STRING); if (!value) goto error; to_store = talloc_asprintf_append_buffer(to_store, "%s %s %s\n", attr,