]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add error message about what's required
authorAlan T. DeKok <aland@freeradius.org>
Fri, 7 Mar 2025 12:49:50 +0000 (07:49 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 7 Mar 2025 12:49:50 +0000 (07:49 -0500)
src/modules/rlm_totp/rlm_totp.c

index d58e1ee56ffe08c6ec42d09e5210ea475877deb4..08929773430883e74b2986aaf228520248758665 100644 (file)
@@ -475,7 +475,10 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authenticate(void *instance, REQUEST *re
        uint64_t now = time(NULL);
 
        password = fr_pair_find_by_num(request->packet->vps, PW_TOTP_PASSWORD, 0, TAG_ANY);
-       if (!password) return RLM_MODULE_NOOP;
+       if (!password) {
+               RDEBUG2("No User-Password attribute in the request.  Cannot do TOTP");
+               return RLM_MODULE_NOOP;
+       }
 
        if ((password->vp_length != 6) && (password->vp_length != 8)) {
                RDEBUG("TOTP-Password has incorrect length %d", (int) password->vp_length);