mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-01 01:52:18 +01:00
only warn about replays if the delta is more than 1 (or less than -1)
This commit is contained in:
parent
6c9edb0db2
commit
9ac5741e6c
@ -162,7 +162,9 @@ if ($sync->countersEqual($localParams, $syncParams)) {
|
||||
if ($syncParams['modified']!=$localParams['modified'] &&
|
||||
$syncParams['nonce']==$localParams['nonce']) {
|
||||
$deltaModified = $syncParams['modified'] - $localParams['modified'];
|
||||
$myLog->log(LOG_WARNING, 'We might have a replay. 2 events at different times have generated the same counters. The time difference is ' . $deltaModified . ' seconds');
|
||||
if($deltaModified < -1 || $deltaModified > 1) {
|
||||
$myLog->log(LOG_WARNING, 'We might have a replay. 2 events at different times have generated the same counters. The time difference is ' . $deltaModified . ' seconds');
|
||||
}
|
||||
}
|
||||
|
||||
if ($syncParams['nonce']!=$localParams['nonce']) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user