Added check if tanExpirationTime is exceeded if set

This commit is contained in:
dankito 2024-09-09 02:56:34 +02:00
parent 75320da2be
commit 20f06387c5
1 changed files with 4 additions and 2 deletions

View File

@ -387,8 +387,10 @@ open class FinTsJobExecutor(
while (tanChallenge.isEnteringTanDone == false) {
delay(500)
// most TANs a valid 5 - 15 minutes. So terminate wait process after that time
if (Instant.nowExt() > tanChallenge.challengeCreationTimestamp.plusMinutes(15)) {
val now = Instant.nowExt()
if ((tanChallenge.tanExpirationTime != null && now > tanChallenge.tanExpirationTime) ||
// most TANs a valid 5 - 15 minutes. So terminate wait process after that time
(tanChallenge.tanExpirationTime == null && now > tanChallenge.challengeCreationTimestamp.plusMinutes(15))) {
if (tanChallenge.isEnteringTanDone == false) {
tanChallenge.userDidNotEnterTan()
}