From: Alan T. DeKok Date: Wed, 18 Nov 2020 18:10:53 +0000 (-0500) Subject: no input means an error X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c3cfecc97f9ff99ddf7a25623fed2c2aa0b7c1e2;p=thirdparty%2Ffreeradius-server.git no input means an error --- diff --git a/src/modules/rlm_chap/rlm_chap.c b/src/modules/rlm_chap/rlm_chap.c index 1bdfd40d775..cc3dbed97bd 100644 --- a/src/modules/rlm_chap/rlm_chap.c +++ b/src/modules/rlm_chap/rlm_chap.c @@ -85,7 +85,10 @@ static xlat_action_t xlat_func_chap_password(TALLOC_CTX *ctx, fr_cursor_t *out, /* * If there's no input, there's no output */ - if (!in) return XLAT_ACTION_DONE; + if (!*in) { + REDEBUG("chap requires a password as input"); + return XLAT_ACTION_FAIL; + } if (fr_value_box_list_concat(ctx, *in, in, FR_TYPE_STRING, true) < 0) { RPEDEBUG("Failed concatenating input");