Skip to content

Commit

Permalink
use eu endpoint for verification when it's enabled (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
merlinfuchs authored Jul 4, 2024
1 parent 301631c commit 34b729c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions friendly-captcha/friendly-captcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* Plugin Name: Friendly Captcha for WordPress
* Description: Protect WordPress website forms from spam and abuse with Friendly Captcha, a privacy-first anti-bot solution.
* Version: 1.14.4
* Version: 1.14.5
* Requires at least: 5.0
* Requires PHP: 7.3
* Author: Friendly Captcha GmbH
Expand All @@ -19,7 +19,7 @@
die;
}

define('FRIENDLY_CAPTCHA_VERSION', '1.14.4');
define('FRIENDLY_CAPTCHA_VERSION', '1.14.5');
define('FRIENDLY_CAPTCHA_FRIENDLY_CHALLENGE_VERSION', '0.9.12');
define('FRIENDLY_CAPTCHA_FRIENDLY_CAPTCHA_SDK_VERSION', '0.1.7');
define('FRIENDLY_CAPTCHA_SUPPORTED_LANGUAGES', [
Expand Down
3 changes: 3 additions & 0 deletions friendly-captcha/includes/verification.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ function frcaptcha_verify_captcha_solution($solution, $sitekey, $api_key)
function frcaptcha_v1_verify_captcha_solution($solution, $sitekey, $api_key)
{
$endpoint = 'https://api.friendlycaptcha.com/api/v1/siteverify';
if (FriendlyCaptcha_Plugin::$instance->get_eu_puzzle_endpoint_active()) {
$endpoint = 'https://eu-api.friendlycaptcha.eu/api/v1/siteverify';
}

$request_body = array(
'secret' => $api_key,
Expand Down
6 changes: 5 additions & 1 deletion friendly-captcha/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: captcha, antispam, spam, contact form, recaptcha, friendly-captcha, block
Requires at least: 5.0
Tested up to: 6.5
Requires PHP: 7.3
Stable tag: 1.14.4
Stable tag: 1.14.5
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -96,6 +96,10 @@ However, you may wish to email the authors of plugins you'd like to support Frie

== Changelog ==

= 1.14.5 =

* Use the EU endpoint for verification when it's enabled

= 1.14.4 =

* Fix captcha being rendered twice in Forminator form
Expand Down

0 comments on commit 34b729c

Please sign in to comment.