From: Alan T. DeKok Date: Wed, 18 Oct 2023 20:28:58 +0000 (-0400) Subject: the taint / untaint functions are pure X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=177d88fd030df6b422bd49e4a84a4de340995e52;p=thirdparty%2Ffreeradius-server.git the taint / untaint functions are pure if they operate on pure data, they return tainted but pure data --- diff --git a/src/lib/unlang/xlat_builtin.c b/src/lib/unlang/xlat_builtin.c index 10a9159c19f..8509b580ea0 100644 --- a/src/lib/unlang/xlat_builtin.c +++ b/src/lib/unlang/xlat_builtin.c @@ -3759,10 +3759,10 @@ do { \ XLAT_REGISTER_ARGS("base64.decode", xlat_func_base64_decode, FR_TYPE_OCTETS, xlat_func_base64_decode_arg); if (unlikely((xlat = xlat_func_register(ctx, "untaint", xlat_func_untaint, FR_TYPE_VOID)) == NULL)) return -1; - xlat_func_flags_set(xlat, XLAT_FUNC_FLAG_INTERNAL); + xlat_func_flags_set(xlat, XLAT_FUNC_FLAG_PURE | XLAT_FUNC_FLAG_INTERNAL); if (unlikely((xlat = xlat_func_register(ctx, "taint", xlat_func_taint, FR_TYPE_VOID)) == NULL)) return -1; - xlat_func_flags_set(xlat, XLAT_FUNC_FLAG_INTERNAL); + xlat_func_flags_set(xlat, XLAT_FUNC_FLAG_PURE | XLAT_FUNC_FLAG_INTERNAL); /* * All of these functions are pure.