mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-12 15:54:27 +01:00
More minor fixes.
This commit is contained in:
parent
116d992da2
commit
1ca175ef2e
@ -35,6 +35,7 @@ header('content-type: text/plain');
|
|||||||
|
|
||||||
$myLog = new Log('ykval-verify');
|
$myLog = new Log('ykval-verify');
|
||||||
$myLog->addField('ip', $_SERVER['REMOTE_ADDR']);
|
$myLog->addField('ip', $_SERVER['REMOTE_ADDR']);
|
||||||
|
|
||||||
$query_string = '';
|
$query_string = '';
|
||||||
if ($_POST)
|
if ($_POST)
|
||||||
{
|
{
|
||||||
@ -77,7 +78,7 @@ $otp = strtolower($otp);
|
|||||||
if (preg_match('/^[jxe.uidchtnbpygk]+$/', $otp))
|
if (preg_match('/^[jxe.uidchtnbpygk]+$/', $otp))
|
||||||
{
|
{
|
||||||
$new_otp = strtr($otp, 'jxe.uidchtnbpygk', 'cbdefghijklnrtuv');
|
$new_otp = strtr($otp, 'jxe.uidchtnbpygk', 'cbdefghijklnrtuv');
|
||||||
$myLog->log(LOG_INFO, 'Dvorak OTP converting ' . $otp . ' to ' . $new_otp);
|
$myLog->log(LOG_INFO, "Dvorak OTP converting $otp to $new_otp");
|
||||||
$otp = $new_otp;
|
$otp = $new_otp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,6 +88,7 @@ $timestamp = getHttpVal('timestamp', 0);
|
|||||||
* Construct response parameters
|
* Construct response parameters
|
||||||
*/
|
*/
|
||||||
$extra = array();
|
$extra = array();
|
||||||
|
|
||||||
if ($protocol_version >= 2.0)
|
if ($protocol_version >= 2.0)
|
||||||
{
|
{
|
||||||
$extra['otp'] = $otp;
|
$extra['otp'] = $otp;
|
||||||
@ -219,8 +221,10 @@ if (($cd = $sync->getClientData($client)) === FALSE)
|
|||||||
}
|
}
|
||||||
$myLog->log(LOG_DEBUG, 'Client data:', $cd);
|
$myLog->log(LOG_DEBUG, 'Client data:', $cd);
|
||||||
|
|
||||||
//// Check client signature
|
|
||||||
//
|
/**
|
||||||
|
* Check client signature
|
||||||
|
*/
|
||||||
$apiKey = base64_decode($cd['secret']);
|
$apiKey = base64_decode($cd['secret']);
|
||||||
|
|
||||||
if ($h != '')
|
if ($h != '')
|
||||||
@ -443,7 +447,10 @@ if ($sessionCounter == $seenSessionCounter && $sessionUse > $seenSessionUse)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fill up with more respone parameters */
|
/**
|
||||||
|
* Fill up with more response parameters
|
||||||
|
*/
|
||||||
|
|
||||||
if ($protocol_version >= 2.0)
|
if ($protocol_version >= 2.0)
|
||||||
{
|
{
|
||||||
$extra['sl'] = $sl_success_rate;
|
$extra['sl'] = $sl_success_rate;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user