Skip to content

Commit 40b335f

Browse files
authored
Merge pull request #785 from CleanTalk/beta (Version: 6.77)
Version: 6.77.
2 parents c1de423 + 6fd14c1 commit 40b335f

38 files changed

+970
-101
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on: # event list
1111
branches:
1212
- dev
1313
- master
14+
- '**'
1415

1516
env: # environment variables (available in any part of the action)
1617
PHP_VERSION: 7.4

cleantalk.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Plugin Name: Anti-Spam by CleanTalk
55
Plugin URI: https://cleantalk.org
66
Description: Max power, all-in-one, no Captcha, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms.
7-
Version: 6.76
7+
Version: 6.77
88
Author: CleanTalk - Anti-Spam Protection <welcome@cleantalk.org>
99
Author URI: https://cleantalk.org
1010
Text Domain: cleantalk-spam-protect

inc/cleantalk-common.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,14 @@ function apbct_get_sender_info()
607607
$page_hits = RequestParameters::get('apbct_page_hits', Cookie::$force_alt_cookies_global);
608608
$page_hits = !empty($page_hits) ? TT::toString($page_hits) : null;
609609

610+
$ct_options = json_encode(
611+
array_merge(
612+
(array) $apbct->settings,
613+
['data__bot_detector_enabled' => apbct__is_bot_detector_enabled() ? 1 : 0]
614+
),
615+
JSON_UNESCAPED_SLASHES
616+
);
617+
610618
//Let's keep $data_array for debugging
611619
$data_array = array(
612620
'plugin_request_id' => $apbct->plugin_request_id,
@@ -615,7 +623,7 @@ function apbct_get_sender_info()
615623
'USER_AGENT' => Server::get('HTTP_USER_AGENT'),
616624
'page_url' => apbct_sender_info___get_page_url(),
617625
'cms_lang' => substr(get_locale(), 0, 2),
618-
'ct_options' => json_encode($apbct->settings, JSON_UNESCAPED_SLASHES),
626+
'ct_options' => $ct_options,
619627
'fields_number' => sizeof($_POST),
620628
'direct_post' => $cookie_is_ok === null && apbct_is_post() ? 1 : 0,
621629
// Raw data to validated JavaScript test in the cloud

inc/cleantalk-integrations-by-hook.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
'ajax' => false
136136
),
137137
'EasyDigitalDownloads' => array(
138-
'hook' => array('edd_pre_process_register_form', 'edd_insert_user_args'),
138+
'hook' => array('edd_pre_process_register_form', 'edd_insert_user_args', 'edd_customer_pre_create'),
139139
'setting' => 'forms__registrations_test',
140140
'ajax' => false
141141
),
@@ -291,6 +291,13 @@
291291
'setting' => 'forms__contact_forms_test',
292292
'ajax' => true
293293
),
294+
'BookingCalendar' => array(
295+
'hook' => [
296+
'WPBC_AJX_BOOKING__CREATE',
297+
],
298+
'setting' => 'forms__contact_forms_test',
299+
'ajax' => true
300+
),
294301
'JobstackThemeRegistration' => array(
295302
'hook' => 'wp_loaded',
296303
'setting' => 'forms__registrations_test',

inc/cleantalk-pluggable.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,6 +1406,13 @@ function apbct_is_skip_request($ajax = false, $ajax_message_obj = array())
14061406
return 'BookingPress service action';
14071407
}
14081408

1409+
if (
1410+
apbct_is_plugin_active('booking/wpdev-booking.php') &&
1411+
(Post::getString('action') === 'WPBC_AJX_BOOKING__CREATE')
1412+
) {
1413+
return 'WP BookingCalendar service action';
1414+
}
1415+
14091416
if (
14101417
(
14111418
apbct_is_plugin_active('pixelyoursite/pixelyoursite.php') ||
@@ -1812,6 +1819,11 @@ class_exists('Cleantalk\Antispam\Integrations\CleantalkInternalForms')
18121819
apbct_is_in_uri('wc-ajax=iwd_opc_update_order_review') ) {
18131820
return 'cartflows_save_cart';
18141821
}
1822+
// WC addon - Metorik Helper plugin service requests
1823+
if ( apbct_is_plugin_active('metorik-helper/metorik-helper.php') &&
1824+
apbct_is_in_uri('wc-ajax=metorik_capture_customer_data') ) {
1825+
return 'metorik-helper skip';
1826+
}
18151827
// Vault Press (JetPack) plugin service requests
18161828
if (
18171829
Post::get('do_backups') !== '' &&

inc/cleantalk-public-integrations.php

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,6 +1460,11 @@ function apbct_form__contactForm7__testSpam($spam, $_submission = null)
14601460
*/
14611461
$input_array = apply_filters('apbct__filter_post', $_POST);
14621462

1463+
$honeypot_params = array();
1464+
if ( isset($input_array['apbct__email_id__wp_contact_form_7']) ) {
1465+
$honeypot_params['honeypot_field'] = ($input_array['apbct__email_id__wp_contact_form_7'] === '') ? 1 : 0;
1466+
}
1467+
14631468
$ct_temp_msg_data = ct_get_fields_any($input_array);
14641469

14651470
$sender_email = isset($ct_temp_msg_data['email']) ? $ct_temp_msg_data['email'] : '';
@@ -1472,21 +1477,24 @@ function apbct_form__contactForm7__testSpam($spam, $_submission = null)
14721477
}
14731478

14741479
$base_call_result = apbct_base_call(
1475-
array(
1476-
'message' => $message,
1477-
'sender_email' => $sender_email,
1478-
'sender_nickname' => $sender_nickname,
1479-
'js_on' => $checkjs,
1480-
'post_info' => array('comment_type' => 'contact_form_wordpress_cf7'),
1481-
'sender_info' => array(
1482-
'form_validation' => ! isset($apbct->validation_error)
1483-
? null
1484-
: json_encode(array(
1485-
'validation_notice' => $apbct->validation_error,
1486-
'page_url' => TT::toString(Server::get('HTTP_HOST')) . TT::toString(Server::get('REQUEST_URI')),
1487-
)),
1488-
'sender_emails_array' => $sender_emails_array,
1480+
array_merge(
1481+
array(
1482+
'message' => $message,
1483+
'sender_email' => $sender_email,
1484+
'sender_nickname' => $sender_nickname,
1485+
'js_on' => $checkjs,
1486+
'post_info' => array('comment_type' => 'contact_form_wordpress_cf7'),
1487+
'sender_info' => array(
1488+
'form_validation' => ! isset($apbct->validation_error)
1489+
? null
1490+
: json_encode(array(
1491+
'validation_notice' => $apbct->validation_error,
1492+
'page_url' => TT::toString(Server::get('HTTP_HOST')) . TT::toString(Server::get('REQUEST_URI')),
1493+
)),
1494+
'sender_emails_array' => $sender_emails_array,
1495+
),
14891496
),
1497+
$honeypot_params
14901498
)
14911499
);
14921500

js/apbct-public-bundle.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/apbct-public-bundle_ext-protection.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/apbct-public-bundle_ext-protection_gathering.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/apbct-public-bundle_full-protection.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)