From 9cf8bce177a7834cfa5b0cc4ff1556031b579f38 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Thu, 14 Jan 2010 14:19:20 +0000 Subject: [PATCH] Fix last commit. --- ykval-verify.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ykval-verify.php b/ykval-verify.php index 6bdee0b..8548e3c 100644 --- a/ykval-verify.php +++ b/ykval-verify.php @@ -80,7 +80,7 @@ if (preg_match("/^[0-9]+$/", $client)==0){ exit; } -if (preg_match("/^[0-9]+$/", $timeout)==0) { +if ($timeout && preg_match("/^[0-9]+$/", $timeout)==0) { $myLog->log(LOG_NOTICE, 'timeout is provided but not correct'); sendResp(S_MISSING_PARAMETER, $apiKey); exit; @@ -93,7 +93,7 @@ if (preg_match("/^[A-Za-z0-9]+$/", $nonce)==0) { } -if (preg_match("/^[0-9]+$/", $sl)==0 || ($sl<0 || $sl>100)) { +if ($sl && (preg_match("/^[0-9]+$/", $sl)==0 || ($sl<0 || $sl>100))) { $myLog->log(LOG_NOTICE, 'SL is provided but not correct'); sendResp(S_MISSING_PARAMETER, $apiKey); exit;