1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-01-20 01:52:15 +01:00

anti otp phishing

This commit is contained in:
Paul Chen 2008-12-03 18:41:02 +00:00
parent 15b2daaf19
commit 6dc200ad48

View File

@ -156,8 +156,9 @@ if ($scDiff == 0) { // Same use session, check time stamp diff
$elapsed = time() - $lastTime;
debug('Elapsed time from last validation: ' . $elapsed . ' secs');
$deviation = abs($elapsed - $tsDelta);
$percent = truncate($deviation/$elapsed, 8) . '%';
debug("Key time deviation vs. elapsed time=".$deviation.' secs ('.
($deviation/$elapsed).'%)');
$percent.')');
if ($deviation > TS_TOLERANCE * $elapsed) {
debug("Is the OTP generated from a real crypto key?");
sendResp(S_SECURITY_ERROR);