]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
totp: Fix call_env setting
authorJorge Pereira <jpereira@freeradius.org>
Wed, 4 Oct 2023 16:42:09 +0000 (13:42 -0300)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 6 Oct 2023 11:26:45 +0000 (07:26 -0400)
The 'nullable' field should be true.

src/modules/rlm_totp/rlm_totp.c

index d9d36660da1533d3b308771c51b703c4858376f8..077a235a05a983fb4caa41dbf8dbc67e2289a0e5 100644 (file)
@@ -39,13 +39,13 @@ typedef struct {
 
 static const call_env_t call_env[] = {
        { FR_CALL_ENV_OFFSET("secret", FR_TYPE_STRING, rlm_totp_call_env_t, secret,
-                            "&control.TOTP.Secret", T_BARE_WORD, false, false, false) },
+                            "&control.TOTP.Secret", T_BARE_WORD, false, true, false) },
 
        { FR_CALL_ENV_OFFSET("key", FR_TYPE_STRING, rlm_totp_call_env_t, key,
-                            "&control.TOTP.key", T_BARE_WORD, false, false, false) },
+                            "&control.TOTP.key", T_BARE_WORD, false, true, false) },
 
        { FR_CALL_ENV_OFFSET("user_password", FR_TYPE_STRING, rlm_totp_call_env_t, user_password,
-                            "&request.TOTP.From-User", T_BARE_WORD, false, false, false) },
+                            "&request.TOTP.From-User", T_BARE_WORD, false, true, false) },
 
        CALL_ENV_TERMINATOR
 };