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

Refactor.

- only add nonce to $extra array after check.
This commit is contained in:
Jean Paul Galea 2015-07-21 20:56:02 +00:00
parent e24b02a7dc
commit e5238b8f54

View File

@ -109,15 +109,15 @@ if ($protocol_version >= 2.0)
$timeout = getHttpVal('timeout', ''); $timeout = getHttpVal('timeout', '');
$nonce = getHttpVal('nonce', ''); $nonce = getHttpVal('nonce', '');
/* Add nonce to response parameters */
$extra['nonce'] = $nonce;
/* Nonce is required from protocol 2.0 */ /* Nonce is required from protocol 2.0 */
if (!$nonce) if (!$nonce)
{ {
$myLog->log(LOG_NOTICE, 'Nonce is missing and protocol version >= 2.0'); $myLog->log(LOG_NOTICE, 'Nonce is missing and protocol version >= 2.0');
sendResp(S_MISSING_PARAMETER, $myLog); sendResp(S_MISSING_PARAMETER, $myLog);
} }
/* Add nonce to response parameters */
$extra['nonce'] = $nonce;
} }