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

More minor fixes.

This commit is contained in:
Jean Paul Galea 2015-07-21 20:26:37 +00:00
parent 116d992da2
commit 1ca175ef2e

View File

@ -35,6 +35,7 @@ header('content-type: text/plain');
$myLog = new Log('ykval-verify');
$myLog->addField('ip', $_SERVER['REMOTE_ADDR']);
$query_string = '';
if ($_POST)
{
@ -77,7 +78,7 @@ $otp = strtolower($otp);
if (preg_match('/^[jxe.uidchtnbpygk]+$/', $otp))
{
$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;
}
@ -87,6 +88,7 @@ $timestamp = getHttpVal('timestamp', 0);
* Construct response parameters
*/
$extra = array();
if ($protocol_version >= 2.0)
{
$extra['otp'] = $otp;
@ -219,8 +221,10 @@ if (($cd = $sync->getClientData($client)) === FALSE)
}
$myLog->log(LOG_DEBUG, 'Client data:', $cd);
//// Check client signature
//
/**
* Check client signature
*/
$apiKey = base64_decode($cd['secret']);
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)
{
$extra['sl'] = $sl_success_rate;