1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-02-12 15:54:27 +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)) { 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. "); $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) && elseif ($this->countersEqual($resParams, $otpParams)
$resParams['nonce']!=$otpParams['nonce']) { && $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."); $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'] . $this->log(LOG_DEBUG, 'deleting queue entry with modified=' . $entry['modified'] .
' server_nonce=' . $entry['server_nonce'] . ' server_nonce=' . $entry['server_nonce'] .
' server=' . $entry['server']); ' server=' . $entry['server']);
$this->db->deleteByMultiple('queue',
array("modified"=>$entry['modified'], $this->db->deleteByMultiple('queue', array(
"server_nonce"=>$entry['server_nonce'], 'modified' => $entry['modified'],
'server'=>$entry['server'])); 'server_nonce' => $entry['server_nonce'],
} else if (preg_match("/status=BAD_OTP/", $response)) { '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->log(LOG_WARNING, "Remote server says BAD_OTP, pointless to try again, removing from queue.");
$this->db->deleteByMultiple('queue', $this->db->deleteByMultiple('queue', array(
array("modified"=>$entry['modified'], 'modified' => $entry['modified'],
"server_nonce"=>$entry['server_nonce'], 'server_nonce' => $entry['server_nonce'],
'server'=>$entry['server'])); '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.");
} }
} /* End of loop over each queue entry for a server */ } /* End of loop over each queue entry for a server */
curl_close($ch); curl_close($ch);
$this->db->closeCursor($res); $this->db->closeCursor($res);
} /* End of loop over each distinct server in queue */ } /* End of loop over each distinct server in queue */
$this->db->closeCursor($server_res); $this->db->closeCursor($server_res);
return true; return true;
} }