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

if the remote sync site says BAD_OTP log and remove from queue

This commit is contained in:
Klas Lindfors 2012-06-14 13:52:53 +02:00
parent b5849acef1
commit d37c41011a

View File

@ -377,6 +377,12 @@ class SyncLib
array("modified"=>$entry['modified'], array("modified"=>$entry['modified'],
"server_nonce"=>$entry['server_nonce'], "server_nonce"=>$entry['server_nonce'],
'server'=>$entry['server'])); 'server'=>$entry['server']));
} else if (preg_match("/status=BAD_OTP/", $response)) {
$this->log(LOG_WARNING, "Remote server says BAD_OTP, pointless to try again, removing from queue.");
$this->db->deleteByMultiple('queue',
array("modified"=>$entry['modified'],
"server_nonce"=>$entry['server_nonce'],
'server'=>$entry['server']));
} else { } else {
$this->log(LOG_ERR, "Remote server refused our sync request. Check remote server logs."); $this->log(LOG_ERR, "Remote server refused our sync request. Check remote server logs.");
} }