From e73261b5b0d9fddba87c35d0a9b5d643a1ec742e Mon Sep 17 00:00:00 2001 From: Abdulrahman Date: Fri, 28 Sep 2018 23:18:12 +0300 Subject: [PATCH] fixes for recaptcha #21 --- plugins/kj_recaptcha/init.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/kj_recaptcha/init.php b/plugins/kj_recaptcha/init.php index 871e64e..c82c80b 100644 --- a/plugins/kj_recaptcha/init.php +++ b/plugins/kj_recaptcha/init.php @@ -336,11 +336,11 @@ if(! function_exists('getReCaptchaInputHtml')) if($config['kj_recaptcha_invisible'] == 1) { - return '
'; + return '
'; } else { - return '
'; + return '
'; } } @@ -415,10 +415,13 @@ if (!function_exists('isReCaptchaValid')) { { global $config; - if(!ip('g-recaptcha-response') || empty(p('g-recaptcha-response'))){ - return false; + if(empty($config['kj_recaptcha_sitekey']) || empty($config['kj_recaptcha_secret'])){ + return true; } + if (!ip('g-recaptcha-response') || empty(p('g-recaptcha-response'))) { + return false; + } try { $data = array(