From: Alan T. DeKok Date: Wed, 18 Jun 2025 19:22:51 +0000 (-0400) Subject: if xlat fails, then we return fail, too X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dd314f1353cbcd78bfa71abefc8d4ce325b3f2df;p=thirdparty%2Ffreeradius-server.git if xlat fails, then we return fail, too revert commit 4086074515 --- diff --git a/src/lib/unlang/xlat_expr.c b/src/lib/unlang/xlat_expr.c index 8050538a1b..a9c70ea5e7 100644 --- a/src/lib/unlang/xlat_expr.c +++ b/src/lib/unlang/xlat_expr.c @@ -1213,6 +1213,15 @@ static xlat_action_t xlat_logical_or_resume(TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_logical_rctx_t *rctx = talloc_get_type_abort(xctx->rctx, xlat_logical_rctx_t); bool match; + /* + * If the expansions fails, then we fail the entire thing. + */ + if (!XLAT_RESULT_SUCCESS(&rctx->last_result)) { + talloc_free(rctx->box); + talloc_free(rctx); + return XLAT_ACTION_FAIL; + } + /* * Recursively check groups. i.e. we effectively flatten each list. * @@ -1308,6 +1317,15 @@ static xlat_action_t xlat_logical_and_resume(TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_logical_rctx_t *rctx = talloc_get_type_abort(xctx->rctx, xlat_logical_rctx_t); bool match; + /* + * If the expansions fails, then we fail the entire thing. + */ + if (!XLAT_RESULT_SUCCESS(&rctx->last_result)) { + talloc_free(rctx->box); + talloc_free(rctx); + return XLAT_ACTION_FAIL; + } + /* * Recursively check groups. i.e. we effectively flatten each list. *