From: Alan T. DeKok Date: Mon, 22 Mar 2021 19:57:17 +0000 (-0400) Subject: suppress secrets here, too X-Git-Tag: release_3_0_22~145 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72c1f718f0059e8af04937b2a88b94e60dd046cb;p=thirdparty%2Ffreeradius-server.git suppress secrets here, too --- diff --git a/src/modules/rlm_perl/rlm_perl.c b/src/modules/rlm_perl/rlm_perl.c index 8f9859ca0b..ee13b671e1 100644 --- a/src/modules/rlm_perl/rlm_perl.c +++ b/src/modules/rlm_perl/rlm_perl.c @@ -632,8 +632,13 @@ static void perl_vp_to_svpvn_element(REQUEST *request, AV *av, VALUE_PAIR const switch (vp->da->type) { case PW_TYPE_STRING: - RDEBUG("$%s{'%s'}[%i] = &%s:%s -> '%s'", hash_name, vp->da->name, *i, - list_name, vp->da->name, vp->vp_strvalue); + if (vp->da->flags.secret && request->root->suppress_secrets && (rad_debug_lvl < 3)) { + RDEBUG("$%s{'%s'}[%i] = &%s:%s -> <<< secret >>>", hash_name, vp->da->name, *i, + list_name, vp->da->name); + } else { + RDEBUG("$%s{'%s'}[%i] = &%s:%s -> '%s'", hash_name, vp->da->name, *i, + list_name, vp->da->name, vp->vp_strvalue); + } sv = newSVpvn(vp->vp_strvalue, vp->vp_length); break; @@ -727,8 +732,13 @@ static void perl_store_vps(UNUSED TALLOC_CTX *ctx, REQUEST *request, VALUE_PAIR */ switch (vp->da->type) { case PW_TYPE_STRING: - RDEBUG("$%s{'%s'} = &%s:%s -> '%s'", hash_name, vp->da->name, list_name, - vp->da->name, vp->vp_strvalue); + if (vp->da->flags.secret && request->root->suppress_secrets && (rad_debug_lvl < 3)) { + RDEBUG("$%s{'%s'} = &%s:%s -> <<< secret >>>", hash_name, vp->da->name, list_name, + vp->da->name); + } else { + RDEBUG("$%s{'%s'} = &%s:%s -> '%s'", hash_name, vp->da->name, list_name, + vp->da->name, vp->vp_strvalue); + } (void)hv_store(rad_hv, name, strlen(name), newSVpvn(vp->vp_strvalue, vp->vp_length), 0); break;