]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
hoist the secret flag on fr_pair_value_copy() too
authorAlan T. DeKok <aland@freeradius.org>
Sun, 20 Aug 2023 13:47:49 +0000 (09:47 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 20 Aug 2023 14:42:10 +0000 (10:42 -0400)
src/lib/util/pair.c

index bfc26ccbe2b7736bae3c6f953bef58e435386fbe..89e70e12e6b6c81beaaef1e9c13294b7ec2cde1f 100644 (file)
@@ -2357,6 +2357,10 @@ int fr_pair_value_copy(fr_pair_t *dst, fr_pair_t *src)
        if (dst->data.type != FR_TYPE_NULL) fr_value_box_clear(&dst->data);
        fr_value_box_copy(dst, &dst->data, &src->data);
 
+       /*
+        *      If either source or destination is secret, then this value is secret.
+        */
+       dst->data.secret |= src->da->flags.secret | dst->da->flags.secret;
        return 0;
 }