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

upd history on validation

This commit is contained in:
Paul Chen 2008-10-10 01:15:22 +00:00
parent 99ad8405ca
commit b639461d87

View File

@ -152,7 +152,7 @@ if ($scDiff == 0 && $hiDiff == 0 && $loDiff >= 0) {
//// Update the DB only upon validation success //// Update the DB only upon validation success
// //
if (updDB($ad['id'], $decoded_token)) { if (updDB($ad['id'], $decoded_token, $client)) {
debug('Validation database updated'); debug('Validation database updated');
sendResp(S_OK); sendResp(S_OK);
} else { } else {
@ -182,7 +182,7 @@ function sendResp($status, $info=null) {
} // End sendResp } // End sendResp
function updDB($keyid, $new) { function updDB($keyid, $new, $client) {
$stmt = 'UPDATE yubikeys SET '. $stmt = 'UPDATE yubikeys SET '.
'accessed=NOW(),'. 'accessed=NOW(),'.
'counter='.$new['session_counter'].','. 'counter='.$new['session_counter'].','.
@ -195,6 +195,9 @@ function updDB($keyid, $new) {
writeLog($err); writeLog($err);
return false; return false;
} }
addHist(0, $_SERVER['REMOTE_ADDR'] , $keyid, $client);
return true; return true;
} }