1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-02-08 03:54:20 +01:00

Cosmetic changes.

- remove last remaining tabs,
	so now the whole file is using the same indentation convention.
This commit is contained in:
Jean Paul Galea 2015-07-15 17:52:26 +02:00
parent 2cc0f50257
commit 514b943945

View File

@ -415,8 +415,8 @@ class SyncLib
if ($this->countersHigherThan($resParams, $otpParams)) {
$this->log(LOG_ERR, "Remote server has higher counters than OTP. This response would have marked the OTP as invalid. ");
}
elseif ($this->countersEqual($resParams, $otpParams) &&
$resParams['nonce']!=$otpParams['nonce']) {
elseif ($this->countersEqual($resParams, $otpParams)
&& $resParams['nonce']!=$otpParams['nonce']) {
$this->log(LOG_ERR, "Remote server has equal counters as OTP and nonce differs. This response would have marked the OTP as invalid.");
}
@ -424,24 +424,33 @@ class SyncLib
$this->log(LOG_DEBUG, 'deleting queue entry with modified=' . $entry['modified'] .
' server_nonce=' . $entry['server_nonce'] .
' server=' . $entry['server']);
$this->db->deleteByMultiple('queue',
array("modified"=>$entry['modified'],
"server_nonce"=>$entry['server_nonce'],
'server'=>$entry['server']));
} else if (preg_match("/status=BAD_OTP/", $response)) {
$this->db->deleteByMultiple('queue', array(
'modified' => $entry['modified'],
'server_nonce' => $entry['server_nonce'],
'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 {
$this->db->deleteByMultiple('queue', 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 */
curl_close($ch);
$this->db->closeCursor($res);
} /* End of loop over each distinct server in queue */
$this->db->closeCursor($server_res);
return true;
}