1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-02-26 21:54:16 +01:00

Refactor.

- removed duplicate variable.
This commit is contained in:
Jean Paul Galea 2015-07-17 23:10:27 +02:00
parent 5a272cf928
commit 2b434df808

View File

@ -281,8 +281,7 @@ if (($otpinfo = KSMdecryptOTP($urls, $myLog, $curlopts)) === FALSE)
$myLog->log(LOG_DEBUG, "Decrypted OTP:", $otpinfo);
// get Yubikey from DB
$devId = substr($otp, 0, strlen ($otp) - TOKEN_LEN);
$yk_publicname = $devId;
$yk_publicname = substr($otp, 0, strlen ($otp) - TOKEN_LEN);
$localParams = $sync->getLocalParams($yk_publicname);
if (!$localParams)
{
@ -293,7 +292,7 @@ if (!$localParams)
$myLog->log(LOG_DEBUG, "Auth data:", $localParams);
if ($localParams['active'] != 1)
{
$myLog->log(LOG_NOTICE, 'De-activated Yubikey ' . $devId);
$myLog->log(LOG_NOTICE, 'De-activated Yubikey ' . $yk_publicname);
sendResp(S_BAD_OTP, $myLog, $apiKey);
}
@ -303,7 +302,7 @@ $otpParams = array(
'modified' => time(),
'otp' => $otp,
'nonce' => $nonce,
'yk_publicname' => $devId,
'yk_publicname' => $yk_publicname,
'yk_counter' => $otpinfo['session_counter'],
'yk_use' => $otpinfo['session_use'],
'yk_high' => $otpinfo['high'],