From e5238b8f543dea41a19d3f83e085313bd9e792f1 Mon Sep 17 00:00:00 2001 From: Jean Paul Galea Date: Tue, 21 Jul 2015 20:56:02 +0000 Subject: [PATCH] Refactor. - only add nonce to $extra array after check. --- ykval-verify.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ykval-verify.php b/ykval-verify.php index 7dc8266..8260354 100644 --- a/ykval-verify.php +++ b/ykval-verify.php @@ -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; }