]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
no input means an error
authorAlan T. DeKok <aland@freeradius.org>
Wed, 18 Nov 2020 18:10:53 +0000 (13:10 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 18 Nov 2020 18:15:11 +0000 (13:15 -0500)
src/modules/rlm_chap/rlm_chap.c

index 1bdfd40d775d62a3753052815e7f5de661706862..cc3dbed97bdc59a77f4656b3c3ecf10027dbebba 100644 (file)
@@ -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");