From: Alan T. DeKok Date: Sun, 20 Aug 2023 13:47:49 +0000 (-0400) Subject: hoist the secret flag on fr_pair_value_copy() too X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4951667cb3d2f69e626b65aafe7453b408fb997a;p=thirdparty%2Ffreeradius-server.git hoist the secret flag on fr_pair_value_copy() too --- diff --git a/src/lib/util/pair.c b/src/lib/util/pair.c index bfc26ccbe2b..89e70e12e6b 100644 --- a/src/lib/util/pair.c +++ b/src/lib/util/pair.c @@ -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; }