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

Cosmetic changes.

This commit is contained in:
Jean Paul Galea 2015-07-15 16:46:06 +02:00
parent 6f74d8336b
commit 3b4735d34d

View File

@ -193,14 +193,16 @@ class SyncLib
$res=$this->db->findBy('yubikeys', 'yk_publicname', $yk_publicname,1); $res=$this->db->findBy('yubikeys', 'yk_publicname', $yk_publicname,1);
} }
if ($res) { if ($res) {
$localParams=array('modified' => $res['modified'], $localParams = array(
'modified' => $res['modified'],
'nonce' => $res['nonce'], 'nonce' => $res['nonce'],
'active' => $res['active'], 'active' => $res['active'],
'yk_publicname' => $yk_publicname, 'yk_publicname' => $yk_publicname,
'yk_counter' => $res['yk_counter'], 'yk_counter' => $res['yk_counter'],
'yk_use' => $res['yk_use'], 'yk_use' => $res['yk_use'],
'yk_high' => $res['yk_high'], 'yk_high' => $res['yk_high'],
'yk_low' => $res['yk_low']); 'yk_low' => $res['yk_low']
);
$this->log(LOG_INFO, "yubikey found in db ", $localParams); $this->log(LOG_INFO, "yubikey found in db ", $localParams);
return $localParams; return $localParams;
@ -305,16 +307,18 @@ class SyncLib
public function deleteQueueEntry($answer) public function deleteQueueEntry($answer)
{ {
preg_match('/url=(.*)\?/', $answer, $out); preg_match('/url=(.*)\?/', $answer, $out);
$server=$out[1]; $server=$out[1];
$this->log(LOG_INFO, "deleting server=" . $server . $this->log(LOG_INFO, "deleting server=" . $server .
" modified=" . $this->otpParams['modified'] . " modified=" . $this->otpParams['modified'] .
" server_nonce=" . $this->server_nonce); " server_nonce=" . $this->server_nonce);
$this->db->deleteByMultiple('queue',
array("modified"=>$this->otpParams['modified'], $this->db->deleteByMultiple('queue', array(
"server_nonce"=>$this->server_nonce, 'modified' => $this->otpParams['modified'],
'server'=>$server)); 'server_nonce' => $this->server_nonce,
'server' => $server
));
} }
public function reSync($older_than=60, $timeout) public function reSync($older_than=60, $timeout)