From 9d93e28739bcf7f6932502331c4da0c8fd5d3568 Mon Sep 17 00:00:00 2001 From: Fredrik Thulin Date: Tue, 29 May 2012 11:11:56 +0200 Subject: [PATCH] Improve logging of refused sync requests. --- ykval-sync.php | 4 ++-- ykval-synclib.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ykval-sync.php b/ykval-sync.php index 8e6e47b..54c86a9 100644 --- a/ykval-sync.php +++ b/ykval-sync.php @@ -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; } diff --git a/ykval-synclib.php b/ykval-synclib.php index 11b2be8..aabce67 100644 --- a/ykval-synclib.php +++ b/ykval-synclib.php @@ -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 */