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:
parent
e24b02a7dc
commit
e5238b8f54
@ -109,15 +109,15 @@ if ($protocol_version >= 2.0)
|
||||
$timeout = getHttpVal('timeout', '');
|
||||
$nonce = getHttpVal('nonce', '');
|
||||
|
||||
/* Add nonce to response parameters */
|
||||
$extra['nonce'] = $nonce;
|
||||
|
||||
/* Nonce is required from protocol 2.0 */
|
||||
if (!$nonce)
|
||||
{
|
||||
$myLog->log(LOG_NOTICE, 'Nonce is missing and protocol version >= 2.0');
|
||||
sendResp(S_MISSING_PARAMETER, $myLog);
|
||||
}
|
||||
|
||||
/* Add nonce to response parameters */
|
||||
$extra['nonce'] = $nonce;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user