mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-22 09:54:14 +01:00
Fix errors with our new logging code :(
This commit is contained in:
parent
64e9671b49
commit
38185be07d
@ -116,7 +116,7 @@ function retrieveURLasync ($ident, $urls, $logger, $ans_req=1, $match="^OK", $re
|
|||||||
$ch = array();
|
$ch = array();
|
||||||
foreach ($urls as $id => $url) {
|
foreach ($urls as $id => $url) {
|
||||||
$handle = curl_init();
|
$handle = curl_init();
|
||||||
$logger->log($ident . " adding URL : " . $url);
|
$logger->log(LOG_DEBUG, $ident . " adding URL : " . $url);
|
||||||
curl_setopt($handle, CURLOPT_URL, $url);
|
curl_setopt($handle, CURLOPT_URL, $url);
|
||||||
curl_setopt($handle, CURLOPT_USERAGENT, "YK-VAL");
|
curl_setopt($handle, CURLOPT_USERAGENT, "YK-VAL");
|
||||||
curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1);
|
||||||
@ -137,16 +137,16 @@ function retrieveURLasync ($ident, $urls, $logger, $ans_req=1, $match="^OK", $re
|
|||||||
;
|
;
|
||||||
|
|
||||||
while ($info = curl_multi_info_read($mh)) {
|
while ($info = curl_multi_info_read($mh)) {
|
||||||
$logger->log($ident . " curl multi info : ", $info);
|
$logger->log(LOG_DEBUG, $ident . " curl multi info : ", $info);
|
||||||
if ($info['result'] == CURLE_OK) {
|
if ($info['result'] == CURLE_OK) {
|
||||||
$str = curl_multi_getcontent($info['handle']);
|
$str = curl_multi_getcontent($info['handle']);
|
||||||
$logger->log($ident . " curl multi content : " . $str);
|
$logger->log(LOG_DEBUG, $ident . " curl multi content : " . $str);
|
||||||
if (preg_match("/".$match."/", $str)) {
|
if (preg_match("/".$match."/", $str)) {
|
||||||
$logger->log($ident . " response matches " . $match);
|
$logger->log(LOG_DEBUG, $ident . " response matches " . $match);
|
||||||
$error = curl_error ($info['handle']);
|
$error = curl_error ($info['handle']);
|
||||||
$errno = curl_errno ($info['handle']);
|
$errno = curl_errno ($info['handle']);
|
||||||
$cinfo = curl_getinfo ($info['handle']);
|
$cinfo = curl_getinfo ($info['handle']);
|
||||||
$logger->log($ident . " errno/error: " . $errno . "/" . $error, $cinfo);
|
$logger->log(LOG_DEBUG, $ident . " errno/error: " . $errno . "/" . $error, $cinfo);
|
||||||
$ans_count++;
|
$ans_count++;
|
||||||
if ($returl) $ans_arr[]="url=" . $cinfo['url'] . "\n" . $str;
|
if ($returl) $ans_arr[]="url=" . $cinfo['url'] . "\n" . $str;
|
||||||
else $ans_arr[]=$str;
|
else $ans_arr[]=$str;
|
||||||
|
@ -169,7 +169,7 @@ if ($localParams['active'] != 1) {
|
|||||||
*/
|
*/
|
||||||
$myLog->log(LOG_WARNING, 'Received sync-request for de-activated Yubikey ' . $yk_publicname .
|
$myLog->log(LOG_WARNING, 'Received sync-request for de-activated Yubikey ' . $yk_publicname .
|
||||||
' - check database synchronization!!!');
|
' - check database synchronization!!!');
|
||||||
sendResp(S_BAD_OTP, $apiKey);
|
sendResp(S_BAD_OTP, $myLog, $apiKey);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user