diff --git a/src/services/totp.service.ts b/src/services/totp.service.ts index 233ddde406..9b4437544d 100644 --- a/src/services/totp.service.ts +++ b/src/services/totp.service.ts @@ -30,7 +30,10 @@ export class TotpService implements TotpServiceAbstraction { } if (params.has('period') && params.get('period') != null) { try { - period = parseInt(params.get('period').trim(), null); + const periodParam = parseInt(params.get('period').trim(), null); + if (periodParam > 0) { + period = periodParam; + } } catch { } } if (params.has('secret') && params.get('secret') != null) {