From: Nick Porter Date: Mon, 29 Apr 2024 08:34:28 +0000 (+0100) Subject: Use correct time value X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a4df44c7f0eaf8e7560338fec543d52027ff374;p=thirdparty%2Ffreeradius-server.git Use correct time value --- diff --git a/src/modules/rlm_totp/totp.c b/src/modules/rlm_totp/totp.c index 4594f2ad964..67f4ae823cf 100644 --- a/src/modules/rlm_totp/totp.c +++ b/src/modules/rlm_totp/totp.c @@ -104,7 +104,7 @@ int fr_totp_cmp(fr_totp_t const *cfg, request_t *request, time_t now, uint8_t co */ for (i = 0, then = now; i <= cfg->lookback_steps; i++, then -= cfg->lookback_interval) { - padded = ((uint64_t) now) / cfg->time_step; + padded = ((uint64_t) then) / cfg->time_step; data[0] = padded >> 56; data[1] = padded >> 48; data[2] = padded >> 40;