mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-01-20 10:52:15 +01:00
Improve logging of refused sync requests.
This commit is contained in:
parent
b5976ad3c9
commit
9d93e28739
@ -106,13 +106,13 @@ foreach (array('yk_counter', 'yk_use', 'yk_high', 'yk_low') as $param) {
|
||||
$yk_publicname = $syncParams['yk_publicname'];
|
||||
$localParams = $sync->getLocalParams($yk_publicname);
|
||||
if (!$localParams) {
|
||||
$myLog->log(LOG_NOTICE, 'Invalid Yubikey ' . $yk_publicname);
|
||||
$myLog->log(LOG_NOTICE, 'Refusing sync of invalid Yubikey ' . $yk_publicname);
|
||||
sendResp(S_BACKEND_ERROR, $apiKey);
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($localParams['active'] != 1) {
|
||||
$myLog->log(LOG_NOTICE, 'De-activated Yubikey ' . $yk_publicname);
|
||||
$myLog->log(LOG_NOTICE, 'Refusing sync of de-activated Yubikey ' . $yk_publicname);
|
||||
sendResp(S_BAD_OTP, $apiKey);
|
||||
exit;
|
||||
}
|
||||
|
@ -369,6 +369,8 @@ class SyncLib
|
||||
array("modified"=>$entry['modified'],
|
||||
"server_nonce"=>$entry['server_nonce'],
|
||||
'server'=>$entry['server']));
|
||||
} else {
|
||||
$this->log(LOG_ERR, "Remote server refused our sync request. Check remote server logs.");
|
||||
}
|
||||
|
||||
} /* End of loop over each queue entry for a server */
|
||||
|
Loading…
x
Reference in New Issue
Block a user