Skip to content

Commit b87695f

Browse files
committed
add error message about what's required
1 parent 1889ea9 commit b87695f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/modules/rlm_totp/rlm_totp.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,10 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authenticate(void *instance, REQUEST *re
475475
uint64_t now = time(NULL);
476476

477477
password = fr_pair_find_by_num(request->packet->vps, PW_TOTP_PASSWORD, 0, TAG_ANY);
478-
if (!password) return RLM_MODULE_NOOP;
478+
if (!password) {
479+
RDEBUG2("No User-Password attribute in the request. Cannot do TOTP");
480+
return RLM_MODULE_NOOP;
481+
}
479482

480483
if ((password->vp_length != 6) && (password->vp_length != 8)) {
481484
RDEBUG("TOTP-Password has incorrect length %d", (int) password->vp_length);

0 commit comments

Comments
 (0)