]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
the taint / untaint functions are pure
authorAlan T. DeKok <aland@freeradius.org>
Wed, 18 Oct 2023 20:28:58 +0000 (16:28 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 18 Oct 2023 20:34:21 +0000 (16:34 -0400)
if they operate on pure data, they return tainted but pure data

src/lib/unlang/xlat_builtin.c

index 10a9159c19f4205fab62098fafa122e2b5b49aeb..8509b580ea0721c2951a4ff40b9cdab729f71959 100644 (file)
@@ -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.