mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-08 03:54:20 +01:00
Refactor.
This commit is contained in:
parent
17378733af
commit
1341227342
@ -444,13 +444,20 @@ if ($sessionCounter == $seenSessionCounter && $sessionUse > $seenSessionUse)
|
|||||||
$percent = 1;
|
$percent = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$myLog->log(LOG_INFO, "Timestamp seen=" . $seenTs . " this=" . $ts .
|
$data = array(
|
||||||
" delta=" . $tsDiff . ' secs=' . $tsDelta .
|
'seen' => $seenTs,
|
||||||
' accessed=' . $lastTime .' (' . $ad['accessed'] . ') now='
|
'this' => $ts,
|
||||||
. $now . ' (' . strftime("%Y-%m-%d %H:%M:%S", $now)
|
'delta' => $tsDiff,
|
||||||
. ') elapsed=' . $elapsed .
|
'secs' => $tsDelta,
|
||||||
' deviation=' . $deviation . ' secs or '.
|
'accessed' => $lastTime .' (' . $ad['accessed'] . ')',
|
||||||
round(100*$percent) . '%');
|
'now' => $now . ' (' . strftime("%Y-%m-%d %H:%M:%S", $now). ')',
|
||||||
|
'elapsed' => $elapsed,
|
||||||
|
'deviation' => $deviation . ' secs or '.round(100*$percent) . '%',
|
||||||
|
);
|
||||||
|
$msg = 'Timestamp';
|
||||||
|
foreach ($data as $k => $v) $msg .= " $k=$v";
|
||||||
|
$myLog->log(LOG_INFO, $msg);
|
||||||
|
unset($data, $msg);
|
||||||
|
|
||||||
if ($deviation > TS_ABS_TOLERANCE && $percent > TS_REL_TOLERANCE)
|
if ($deviation > TS_ABS_TOLERANCE && $percent > TS_REL_TOLERANCE)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user