Version Description
Jun 21 2022 =
General contact form catching fixed
- Revert "Integration before common aa (#129)"
Download this release
Release Info
Developer | glomberg |
Plugin | Spam protection, AntiSpam, FireWall by CleanTalk |
Version | 5.179.1 |
Comparing to | |
See all releases |
Code changes from version 5.179 to 5.179.1
- cleantalk.php +12 -20
- inc/cleantalk-common.php +5 -65
- inc/cleantalk-public-validate.php +1 -7
- inc/cleantalk-public.php +26 -0
- readme.txt +6 -2
cleantalk.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Anti-Spam by CleanTalk
|
5 |
Plugin URI: https://cleantalk.org
|
6 |
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: 5.179
|
8 |
Author: СleanTalk <welcome@cleantalk.org>
|
9 |
Author URI: https://cleantalk.org
|
10 |
Text Domain: cleantalk-spam-protect
|
@@ -606,6 +606,14 @@ if ( is_admin() || is_network_admin() ) {
|
|
606 |
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public-validate.php');
|
607 |
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public.php');
|
608 |
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public-integrations.php');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
609 |
|
610 |
// Sends feedback to the cloud about comments
|
611 |
// add_action('wp_set_comment_status', 'ct_comment_send_feedback', 10, 2);
|
@@ -626,14 +634,6 @@ if ( is_admin() || is_network_admin() ) {
|
|
626 |
|
627 |
add_filter('plugin_row_meta', 'apbct_admin__register_plugin_links', 10, 3);
|
628 |
}
|
629 |
-
|
630 |
-
/**
|
631 |
-
* This hook is triggered if the request is from a form
|
632 |
-
* with which we did not integrate.
|
633 |
-
*/
|
634 |
-
if (apbct_need_to_process_unknown_post_request()) {
|
635 |
-
add_action('shutdown', 'ct_contact_form_validate', 999);
|
636 |
-
}
|
637 |
// Public pages actions
|
638 |
} else {
|
639 |
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public-validate.php');
|
@@ -678,14 +678,6 @@ if ( is_admin() || is_network_admin() ) {
|
|
678 |
ct_contact_form_validate();
|
679 |
$_POST['redirect_to'] = $tmp;
|
680 |
}
|
681 |
-
|
682 |
-
/**
|
683 |
-
* This hook is triggered if the request is from a form
|
684 |
-
* with which we did not integrate.
|
685 |
-
*/
|
686 |
-
if (apbct_need_to_process_unknown_post_request()) {
|
687 |
-
add_action('shutdown', 'ct_contact_form_validate', 999);
|
688 |
-
}
|
689 |
}
|
690 |
|
691 |
// Short code for GDPR
|
@@ -1473,7 +1465,7 @@ function apbct_sfw_update__end_of_update($is_first_updating = false)
|
|
1473 |
global $apbct;
|
1474 |
|
1475 |
// Delete update errors
|
1476 |
-
$apbct->errorDelete('sfw_update',
|
1477 |
|
1478 |
// Running sfw update once again in 12 min if entries is < 4000
|
1479 |
if ( $is_first_updating &&
|
@@ -1761,7 +1753,7 @@ function ct_sfw_send_logs($api_key = '')
|
|
1761 |
if ( empty($result['error']) ) {
|
1762 |
$apbct->stats['sfw']['last_send_time'] = time();
|
1763 |
$apbct->stats['sfw']['last_send_amount'] = $result['rows'];
|
1764 |
-
$apbct->errorDelete('sfw_send_logs',
|
1765 |
$apbct->save('stats');
|
1766 |
}
|
1767 |
|
@@ -2426,7 +2418,7 @@ function ct_account_status_check($api_key = null, $process_errors = true)
|
|
2426 |
$cron = new Cron();
|
2427 |
$cron->updateTask('check_account_status', 'ct_account_status_check', 86400);
|
2428 |
|
2429 |
-
$apbct->errorDelete('account_check',
|
2430 |
|
2431 |
$apbct->saveData();
|
2432 |
} elseif ( $process_errors ) {
|
4 |
Plugin Name: Anti-Spam by CleanTalk
|
5 |
Plugin URI: https://cleantalk.org
|
6 |
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: 5.179.1
|
8 |
Author: СleanTalk <welcome@cleantalk.org>
|
9 |
Author URI: https://cleantalk.org
|
10 |
Text Domain: cleantalk-spam-protect
|
606 |
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public-validate.php');
|
607 |
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public.php');
|
608 |
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public-integrations.php');
|
609 |
+
//Bitrix24 contact form
|
610 |
+
if ( $apbct->settings['forms__general_contact_forms_test'] == 1 &&
|
611 |
+
! empty(Post::get('your-phone')) &&
|
612 |
+
! empty(Post::get('your-email')) &&
|
613 |
+
! empty(Post::get('your-message'))
|
614 |
+
) {
|
615 |
+
ct_contact_form_validate();
|
616 |
+
}
|
617 |
|
618 |
// Sends feedback to the cloud about comments
|
619 |
// add_action('wp_set_comment_status', 'ct_comment_send_feedback', 10, 2);
|
634 |
|
635 |
add_filter('plugin_row_meta', 'apbct_admin__register_plugin_links', 10, 3);
|
636 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
637 |
// Public pages actions
|
638 |
} else {
|
639 |
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-public-validate.php');
|
678 |
ct_contact_form_validate();
|
679 |
$_POST['redirect_to'] = $tmp;
|
680 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
681 |
}
|
682 |
|
683 |
// Short code for GDPR
|
1465 |
global $apbct;
|
1466 |
|
1467 |
// Delete update errors
|
1468 |
+
$apbct->errorDelete('sfw_update', true);
|
1469 |
|
1470 |
// Running sfw update once again in 12 min if entries is < 4000
|
1471 |
if ( $is_first_updating &&
|
1753 |
if ( empty($result['error']) ) {
|
1754 |
$apbct->stats['sfw']['last_send_time'] = time();
|
1755 |
$apbct->stats['sfw']['last_send_amount'] = $result['rows'];
|
1756 |
+
$apbct->errorDelete('sfw_send_logs', true);
|
1757 |
$apbct->save('stats');
|
1758 |
}
|
1759 |
|
2418 |
$cron = new Cron();
|
2419 |
$cron->updateTask('check_account_status', 'ct_account_status_check', 86400);
|
2420 |
|
2421 |
+
$apbct->errorDelete('account_check', true);
|
2422 |
|
2423 |
$apbct->saveData();
|
2424 |
} elseif ( $process_errors ) {
|
inc/cleantalk-common.php
CHANGED
@@ -220,6 +220,11 @@ function apbct_base_call($params = array(), $reg_flag = false)
|
|
220 |
'apbct__email_id__wp_wpforms' => Post::get('apbct__email_id__wp_wpforms'),
|
221 |
'apbct__email_id__search_form' => Post::get('apbct__email_id__search_form')
|
222 |
);
|
|
|
|
|
|
|
|
|
|
|
223 |
// if source is filled then pass them to params as additional fields
|
224 |
foreach ($honeypot_potential_values as $source_name => $source_value) {
|
225 |
if ( $source_value ) {
|
@@ -1247,68 +1252,3 @@ function apbct__wc_add_honeypot_field($fields)
|
|
1247 |
|
1248 |
return $fields;
|
1249 |
}
|
1250 |
-
|
1251 |
-
/**
|
1252 |
-
* The function determines whether it is necessary
|
1253 |
-
* to conduct a general check of the post request
|
1254 |
-
*
|
1255 |
-
* @return boolean
|
1256 |
-
*/
|
1257 |
-
function apbct_need_to_process_unknown_post_request()
|
1258 |
-
{
|
1259 |
-
global $apbct;
|
1260 |
-
|
1261 |
-
/** Exclude Ajax requests */
|
1262 |
-
if ( apbct_is_ajax() ) {
|
1263 |
-
return false;
|
1264 |
-
}
|
1265 |
-
|
1266 |
-
/** Bitrix24 contact form */
|
1267 |
-
if ( $apbct->settings['forms__general_contact_forms_test'] == 1 &&
|
1268 |
-
! empty(Post::get('your-phone')) &&
|
1269 |
-
! empty(Post::get('your-email')) &&
|
1270 |
-
! empty(Post::get('your-message'))
|
1271 |
-
) {
|
1272 |
-
return true;
|
1273 |
-
}
|
1274 |
-
|
1275 |
-
/** VFB_Pro integration */
|
1276 |
-
if (
|
1277 |
-
! empty($_POST) &&
|
1278 |
-
$apbct->settings['forms__contact_forms_test'] == 1 &&
|
1279 |
-
empty(Post::get('ct_checkjs_cf7')) &&
|
1280 |
-
apbct_is_plugin_active('vfb-pro/vfb-pro.php') &&
|
1281 |
-
! empty(Post::get('_vfb-form-id'))
|
1282 |
-
) {
|
1283 |
-
return true;
|
1284 |
-
}
|
1285 |
-
|
1286 |
-
/** Integration with custom forms */
|
1287 |
-
if (
|
1288 |
-
! empty($_POST) &&
|
1289 |
-
apbct_custom_forms_trappings()
|
1290 |
-
) {
|
1291 |
-
return true;
|
1292 |
-
}
|
1293 |
-
|
1294 |
-
if (
|
1295 |
-
$apbct->settings['forms__general_contact_forms_test'] == 1 &&
|
1296 |
-
empty(Post::get('ct_checkjs_cf7')) &&
|
1297 |
-
! apbct_is_direct_trackback()
|
1298 |
-
) {
|
1299 |
-
return true;
|
1300 |
-
}
|
1301 |
-
|
1302 |
-
if ( apbct_is_user_enable() ) {
|
1303 |
-
if (
|
1304 |
-
$apbct->settings['forms__general_contact_forms_test'] == 1 &&
|
1305 |
-
! Post::get('comment_post_ID') &&
|
1306 |
-
! Get::get('for') &&
|
1307 |
-
! apbct_is_direct_trackback()
|
1308 |
-
) {
|
1309 |
-
return true;
|
1310 |
-
}
|
1311 |
-
}
|
1312 |
-
|
1313 |
-
return false;
|
1314 |
-
}
|
220 |
'apbct__email_id__wp_wpforms' => Post::get('apbct__email_id__wp_wpforms'),
|
221 |
'apbct__email_id__search_form' => Post::get('apbct__email_id__search_form')
|
222 |
);
|
223 |
+
|
224 |
+
if ( !empty(Get::get('apbct_submit_id__search_form')) ) {
|
225 |
+
$honeypot_potential_values['apbct__email_id__search_form'] = Get::get('apbct__email_id__search_form');
|
226 |
+
}
|
227 |
+
|
228 |
// if source is filled then pass them to params as additional fields
|
229 |
foreach ($honeypot_potential_values as $source_name => $source_value) {
|
230 |
if ( $source_value ) {
|
1252 |
|
1253 |
return $fields;
|
1254 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/cleantalk-public-validate.php
CHANGED
@@ -7,7 +7,7 @@ use Cleantalk\Variables\Server;
|
|
7 |
*/
|
8 |
function ct_contact_form_validate()
|
9 |
{
|
10 |
-
global $pagenow, $apbct, $ct_checkjs_frm
|
11 |
|
12 |
// Exclude the XML-RPC requests
|
13 |
if ( defined('XMLRPC_REQUEST') ) {
|
@@ -21,12 +21,6 @@ function ct_contact_form_validate()
|
|
21 |
return null;
|
22 |
}
|
23 |
|
24 |
-
// Verification completed
|
25 |
-
if ( $cleantalk_executed ) {
|
26 |
-
do_action('apbct_skipped_request', __FILE__ . ' -> ' . __FUNCTION__ . '():' . __LINE__, $_POST);
|
27 |
-
return null;
|
28 |
-
}
|
29 |
-
|
30 |
if ( @sizeof($_POST) == 0 ||
|
31 |
(isset($_POST['signup_username']) && isset($_POST['signup_email']) && isset($_POST['signup_password'])) ||
|
32 |
(isset($pagenow) && $pagenow == 'wp-login.php') || // WordPress log in form
|
7 |
*/
|
8 |
function ct_contact_form_validate()
|
9 |
{
|
10 |
+
global $pagenow, $apbct, $ct_checkjs_frm;
|
11 |
|
12 |
// Exclude the XML-RPC requests
|
13 |
if ( defined('XMLRPC_REQUEST') ) {
|
21 |
return null;
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
if ( @sizeof($_POST) == 0 ||
|
25 |
(isset($_POST['signup_username']) && isset($_POST['signup_email']) && isset($_POST['signup_password'])) ||
|
26 |
(isset($pagenow) && $pagenow == 'wp-login.php') || // WordPress log in form
|
inc/cleantalk-public.php
CHANGED
@@ -125,6 +125,17 @@ function apbct_init()
|
|
125 |
add_action('wp', 'ct_ajax_hook', 1);
|
126 |
}
|
127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
//hook for Anonymous Post
|
129 |
if ( $apbct->settings['data__general_postdata_test'] == 1 && empty(Post::get('ct_checkjs_cf7')) ) {
|
130 |
add_action('init', 'ct_contact_form_validate_postdata', 1000);
|
@@ -132,6 +143,7 @@ function apbct_init()
|
|
132 |
|
133 |
if ( $apbct->settings['forms__general_contact_forms_test'] == 1 && empty(Post::get('ct_checkjs_cf7')) && ! apbct_is_direct_trackback() ) {
|
134 |
add_action('CMA_custom_post_type_nav', 'ct_contact_form_validate_postdata', 1);
|
|
|
135 |
if (
|
136 |
Post::get('reg_redirect_link') !== '' &&
|
137 |
Post::get('tmpl_registration_nonce_field') !== ''
|
@@ -333,7 +345,14 @@ function apbct_init()
|
|
333 |
add_action('wp_footer', 'apbct_hook__wp_footer', 1);
|
334 |
}
|
335 |
|
|
|
|
|
|
|
|
|
336 |
if ( apbct_is_user_enable() ) {
|
|
|
|
|
|
|
337 |
if ( apbct_is_post() &&
|
338 |
$apbct->settings['data__general_postdata_test'] == 1 &&
|
339 |
! Post::get('ct_checkjs_cf7') &&
|
@@ -343,6 +362,13 @@ function apbct_init()
|
|
343 |
add_action('init', 'ct_contact_form_validate_postdata', 1000);
|
344 |
}
|
345 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
}
|
347 |
|
348 |
function apbct_buffer__start()
|
125 |
add_action('wp', 'ct_ajax_hook', 1);
|
126 |
}
|
127 |
|
128 |
+
/** VFB_Pro integration */
|
129 |
+
if (
|
130 |
+
! empty($_POST) &&
|
131 |
+
$apbct->settings['forms__contact_forms_test'] == 1 &&
|
132 |
+
empty(Post::get('ct_checkjs_cf7')) &&
|
133 |
+
apbct_is_plugin_active('vfb-pro/vfb-pro.php') &&
|
134 |
+
! empty(Post::get('_vfb-form-id'))
|
135 |
+
) {
|
136 |
+
ct_contact_form_validate();
|
137 |
+
}
|
138 |
+
|
139 |
//hook for Anonymous Post
|
140 |
if ( $apbct->settings['data__general_postdata_test'] == 1 && empty(Post::get('ct_checkjs_cf7')) ) {
|
141 |
add_action('init', 'ct_contact_form_validate_postdata', 1000);
|
143 |
|
144 |
if ( $apbct->settings['forms__general_contact_forms_test'] == 1 && empty(Post::get('ct_checkjs_cf7')) && ! apbct_is_direct_trackback() ) {
|
145 |
add_action('CMA_custom_post_type_nav', 'ct_contact_form_validate_postdata', 1);
|
146 |
+
add_action('init', 'ct_contact_form_validate', 999);
|
147 |
if (
|
148 |
Post::get('reg_redirect_link') !== '' &&
|
149 |
Post::get('tmpl_registration_nonce_field') !== ''
|
345 |
add_action('wp_footer', 'apbct_hook__wp_footer', 1);
|
346 |
}
|
347 |
|
348 |
+
if ( $apbct->settings['data__protect_logged_in'] != 1 && is_user_logged_in() ) {
|
349 |
+
add_action('init', 'ct_contact_form_validate', 999);
|
350 |
+
}
|
351 |
+
|
352 |
if ( apbct_is_user_enable() ) {
|
353 |
+
if ( $apbct->settings['forms__general_contact_forms_test'] == 1 && ! Post::get('comment_post_ID') && ! Get::get('for') && ! apbct_is_direct_trackback() ) {
|
354 |
+
add_action('init', 'ct_contact_form_validate', 999);
|
355 |
+
}
|
356 |
if ( apbct_is_post() &&
|
357 |
$apbct->settings['data__general_postdata_test'] == 1 &&
|
358 |
! Post::get('ct_checkjs_cf7') &&
|
362 |
add_action('init', 'ct_contact_form_validate_postdata', 1000);
|
363 |
}
|
364 |
}
|
365 |
+
|
366 |
+
/**
|
367 |
+
* Integration with custom forms
|
368 |
+
*/
|
369 |
+
if ( ! empty($_POST) && apbct_custom_forms_trappings() ) {
|
370 |
+
add_action('init', 'ct_contact_form_validate', 999);
|
371 |
+
}
|
372 |
}
|
373 |
|
374 |
function apbct_buffer__start()
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Spam protection, AntiSpam, FireWall by CleanTalk ===
|
2 |
-
Contributors: glomberg,
|
3 |
Tags: spam, antispam, anti-spam, comments, firewall
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 6.0
|
6 |
Requires PHP: 5.6
|
7 |
-
Stable tag: 5.
|
8 |
License: GPLv2
|
9 |
|
10 |
Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
|
@@ -602,6 +602,10 @@ If your website has forms that send data to external sources, you can enable opt
|
|
602 |
|
603 |
== Changelog ==
|
604 |
|
|
|
|
|
|
|
|
|
605 |
= 5.179 Jun 16 2022 =
|
606 |
#### Email Encoder functionality improved, SFW updating process improved and some minor issues fixed.
|
607 |
* New. EmailEncoder.php->modifyContent. Admins and logged in exclusions.
|
1 |
=== Spam protection, AntiSpam, FireWall by CleanTalk ===
|
2 |
+
Contributors: safronik, glomberg, artemacleantalk
|
3 |
Tags: spam, antispam, anti-spam, comments, firewall
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 6.0
|
6 |
Requires PHP: 5.6
|
7 |
+
Stable tag: 5.179.1
|
8 |
License: GPLv2
|
9 |
|
10 |
Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
|
602 |
|
603 |
== Changelog ==
|
604 |
|
605 |
+
= 5.179.1 Jun 21 2022 =
|
606 |
+
#### General contact form catching fixed
|
607 |
+
* Revert "Integration before common aa (#129)"
|
608 |
+
|
609 |
= 5.179 Jun 16 2022 =
|
610 |
#### Email Encoder functionality improved, SFW updating process improved and some minor issues fixed.
|
611 |
* New. EmailEncoder.php->modifyContent. Admins and logged in exclusions.
|