Version Description
December 21 2018 = * Fix: Woocommerce AJAX checkout form. * Fix: Profile Builder Pro. * Fix: DB structure improvements for WPMS. * Spam filtering quality improved. * Minor fixes.
Download this release
Release Info
Developer | Safronik |
Plugin | Spam protection, AntiSpam, FireWall by CleanTalk |
Version | 5.112 |
Comparing to | |
See all releases |
Code changes from version 5.111 to 5.112
- cleantalk.php +37 -2
- inc/cleantalk-ajax.php +22 -15
- inc/cleantalk-common.php +1 -0
- inc/cleantalk-public.php +2 -2
- inc/cleantalk-settings.php +7 -15
- js/apbct-public.js +0 -2
- readme.txt +21 -2
cleantalk.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Anti-Spam by CleanTalk
|
4 |
Plugin URI: http://cleantalk.org
|
5 |
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.
|
6 |
-
Version: 5.
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: http://cleantalk.org
|
9 |
*/
|
@@ -89,7 +89,7 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
89 |
// Database constants
|
90 |
define('APBCT_TBL_FIREWALL_DATA', $apbct->db_prefix . 'cleantalk_sfw'); // Table with firewall data.
|
91 |
define('APBCT_TBL_FIREWALL_LOG', $apbct->db_prefix . 'cleantalk_sfw_logs'); // Table with firewall logs.
|
92 |
-
define('APBCT_TBL_SESSIONS', $apbct->db_prefix . 'cleantalk_sessions'); // Table with session data.
|
93 |
define('APBCT_SELECT_LIMIT', 5000); // Select limit for logs.
|
94 |
define('APBCT_WRITE_LIMIT', 5000); // Write limit for firewall data.
|
95 |
|
@@ -164,6 +164,9 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
164 |
register_activation_hook( __FILE__, 'apbct_activation' );
|
165 |
register_deactivation_hook( __FILE__, 'apbct_deactivation' );
|
166 |
|
|
|
|
|
|
|
167 |
// Async loading for JavaScript
|
168 |
add_filter('script_loader_tag', 'apbct_add_async_attribute', 10, 3);
|
169 |
|
@@ -504,6 +507,38 @@ function apbct_activation( $network ) {
|
|
504 |
add_option('ct_plugin_do_activation_redirect', true);
|
505 |
}
|
506 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
507 |
/**
|
508 |
* On deactivation, clear schedule.
|
509 |
*/
|
3 |
Plugin Name: Anti-Spam by CleanTalk
|
4 |
Plugin URI: http://cleantalk.org
|
5 |
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.
|
6 |
+
Version: 5.112
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: http://cleantalk.org
|
9 |
*/
|
89 |
// Database constants
|
90 |
define('APBCT_TBL_FIREWALL_DATA', $apbct->db_prefix . 'cleantalk_sfw'); // Table with firewall data.
|
91 |
define('APBCT_TBL_FIREWALL_LOG', $apbct->db_prefix . 'cleantalk_sfw_logs'); // Table with firewall logs.
|
92 |
+
// define('APBCT_TBL_SESSIONS', $apbct->db_prefix . 'cleantalk_sessions'); // Table with session data.
|
93 |
define('APBCT_SELECT_LIMIT', 5000); // Select limit for logs.
|
94 |
define('APBCT_WRITE_LIMIT', 5000); // Write limit for firewall data.
|
95 |
|
164 |
register_activation_hook( __FILE__, 'apbct_activation' );
|
165 |
register_deactivation_hook( __FILE__, 'apbct_deactivation' );
|
166 |
|
167 |
+
// Hook for newly added blog
|
168 |
+
add_action('wpmu_new_blog', 'apbct_activation__new_blog', 10, 6);
|
169 |
+
|
170 |
// Async loading for JavaScript
|
171 |
add_filter('script_loader_tag', 'apbct_add_async_attribute', 10, 3);
|
172 |
|
507 |
add_option('ct_plugin_do_activation_redirect', true);
|
508 |
}
|
509 |
|
510 |
+
function apbct_activation__new_blog($blog_id, $user_id, $domain, $path, $site_id, $meta) {
|
511 |
+
if (is_plugin_active_for_network('security-malware-firewall/security-malware-firewall.php')){
|
512 |
+
switch_to_blog($blog_id);
|
513 |
+
global $wpdb;
|
514 |
+
$sfw_data_query = 'CREATE TABLE IF NOT EXISTS `%scleantalk_sfw` (
|
515 |
+
`network` int(11) unsigned NOT NULL,
|
516 |
+
`mask` int(11) unsigned NOT NULL,
|
517 |
+
INDEX ( `network` , `mask` )
|
518 |
+
) ENGINE = MYISAM ;';
|
519 |
+
|
520 |
+
$sfw_log_query = 'CREATE TABLE IF NOT EXISTS `%scleantalk_sfw_logs` (
|
521 |
+
`ip` VARCHAR(15) NOT NULL,
|
522 |
+
`all_entries` INT NOT NULL,
|
523 |
+
`blocked_entries` INT NOT NULL,
|
524 |
+
`entries_timestamp` INT NOT NULL,
|
525 |
+
PRIMARY KEY (`ip`))
|
526 |
+
ENGINE = MYISAM;';
|
527 |
+
// Cron tasks
|
528 |
+
CleantalkCron::addTask('check_account_status', 'ct_account_status_check', 3600, time()+1800); // Checks account status
|
529 |
+
CleantalkCron::addTask('delete_spam_comments', 'ct_delete_spam_comments', 3600, time()+3500); // Formerly ct_hourly_event_hook()
|
530 |
+
CleantalkCron::addTask('send_feedback', 'ct_send_feedback', 3600, time()+3500); // Formerly ct_hourly_event_hook()
|
531 |
+
CleantalkCron::addTask('sfw_update', 'ct_sfw_update', 86400, time()+43200); // SFW update
|
532 |
+
CleantalkCron::addTask('send_sfw_logs', 'ct_sfw_send_logs', 3600, time()+1800); // SFW send logs
|
533 |
+
CleantalkCron::addTask('get_brief_data', 'cleantalk_get_brief_data', 86400, time()+3500); // Get data for dashboard widget
|
534 |
+
CleantalkCron::addTask('send_connection_report','ct_mail_send_connection_report', 86400, time()+3500); // Send connection report to welcome@cleantalk.org
|
535 |
+
$wpdb->query(sprintf($sfw_data_query, $wpdb->prefx)); // Table for SpamFireWall data
|
536 |
+
$wpdb->query(sprintf($sfw_log_query, $wpdb->prefx)); // Table for SpamFireWall logs
|
537 |
+
ct_sfw_update(); // Updating SFW
|
538 |
+
restore_current_blog();
|
539 |
+
}
|
540 |
+
}
|
541 |
+
|
542 |
/**
|
543 |
* On deactivation, clear schedule.
|
544 |
*/
|
inc/cleantalk-ajax.php
CHANGED
@@ -270,8 +270,12 @@ function ct_ajax_hook($message_obj = false, $additional = false)
|
|
270 |
'gmw_ps_display_info_window', // Geo My WP pop-up windows.
|
271 |
'the_champ_user_auth', // Super Socializer
|
272 |
'simbatfa-init-otp', //Two-Factor Auth
|
|
|
273 |
);
|
274 |
|
|
|
|
|
|
|
275 |
$checkjs = apbct_js_test('ct_checkjs', $_COOKIE, true);
|
276 |
if ($checkjs && // Spammers usually fail the JS test
|
277 |
(isset($_POST['action']) && in_array($_POST['action'], $skip_post))
|
@@ -319,7 +323,10 @@ function ct_ajax_hook($message_obj = false, $additional = false)
|
|
319 |
$ct_post_temp['email'] = $_POST['user_email'];
|
320 |
$ct_post_temp['comment'] = $_POST['comment'];
|
321 |
}
|
322 |
-
|
|
|
|
|
|
|
323 |
$ct_temp_msg_data = isset($ct_post_temp)
|
324 |
? ct_get_fields_any($ct_post_temp)
|
325 |
: ct_get_fields_any($_POST);
|
@@ -353,19 +360,19 @@ function ct_ajax_hook($message_obj = false, $additional = false)
|
|
353 |
* @todo Contact form detect
|
354 |
*/
|
355 |
// Detect contact form an set it's name to $contact_form to use later
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
|
370 |
$base_call_result = apbct_base_call(
|
371 |
array(
|
@@ -373,7 +380,7 @@ function ct_ajax_hook($message_obj = false, $additional = false)
|
|
373 |
'sender_email' => $sender_email,
|
374 |
'sender_nickname' => $sender_nickname,
|
375 |
'sender_info' => array('post_checkjs_passed' => $checkjs),
|
376 |
-
'post_info' =>
|
377 |
'checkjs' => $checkjs,
|
378 |
)
|
379 |
);
|
270 |
'gmw_ps_display_info_window', // Geo My WP pop-up windows.
|
271 |
'the_champ_user_auth', // Super Socializer
|
272 |
'simbatfa-init-otp', //Two-Factor Auth
|
273 |
+
'wppb_msf_check_required_fields', //ProfileBuilder skip step checking
|
274 |
);
|
275 |
|
276 |
+
//General post_info for all ajax calls
|
277 |
+
$post_info = array('comment_type' => 'feedback_ajax');
|
278 |
+
|
279 |
$checkjs = apbct_js_test('ct_checkjs', $_COOKIE, true);
|
280 |
if ($checkjs && // Spammers usually fail the JS test
|
281 |
(isset($_POST['action']) && in_array($_POST['action'], $skip_post))
|
323 |
$ct_post_temp['email'] = $_POST['user_email'];
|
324 |
$ct_post_temp['comment'] = $_POST['comment'];
|
325 |
}
|
326 |
+
//Woocommerce checkout
|
327 |
+
if(isset($_POST['action']) && $_POST['action']=='woocommerce_checkout'){
|
328 |
+
$post_info['comment_type'] = 'order';
|
329 |
+
}
|
330 |
$ct_temp_msg_data = isset($ct_post_temp)
|
331 |
? ct_get_fields_any($ct_post_temp)
|
332 |
: ct_get_fields_any($_POST);
|
360 |
* @todo Contact form detect
|
361 |
*/
|
362 |
// Detect contact form an set it's name to $contact_form to use later
|
363 |
+
$contact_form = null;
|
364 |
+
foreach($_POST as $param => $value){
|
365 |
+
if(strpos($param, 'et_pb_contactform_submit') === 0){
|
366 |
+
$contact_form = 'contact_form_divi_theme';
|
367 |
+
$contact_form_additional = str_replace('et_pb_contactform_submit', '', $param);
|
368 |
+
}
|
369 |
+
if(strpos($param, 'avia_generated_form') === 0){
|
370 |
+
$contact_form = 'contact_form_enfold_theme';
|
371 |
+
$contact_form_additional = str_replace('avia_generated_form', '', $param);
|
372 |
+
}
|
373 |
+
if(!empty($contact_form))
|
374 |
+
break;
|
375 |
+
}
|
376 |
|
377 |
$base_call_result = apbct_base_call(
|
378 |
array(
|
380 |
'sender_email' => $sender_email,
|
381 |
'sender_nickname' => $sender_nickname,
|
382 |
'sender_info' => array('post_checkjs_passed' => $checkjs),
|
383 |
+
'post_info' => $post_info,
|
384 |
'checkjs' => $checkjs,
|
385 |
)
|
386 |
);
|
inc/cleantalk-common.php
CHANGED
@@ -182,6 +182,7 @@ function apbct_get_sender_info() {
|
|
182 |
: null;
|
183 |
|
184 |
return array(
|
|
|
185 |
'remote_addr' => CleantalkHelper::ip_get(array('remote_addr'), false),
|
186 |
'REFFERRER' => isset($_SERVER['HTTP_REFERER']) ? htmlspecialchars($_SERVER['HTTP_REFERER']) : null,
|
187 |
'USER_AGENT' => isset($_SERVER['HTTP_USER_AGENT']) ? htmlspecialchars($_SERVER['HTTP_USER_AGENT']) : null,
|
182 |
: null;
|
183 |
|
184 |
return array(
|
185 |
+
'js_keys' => json_encode($apbct->data['js_keys']),
|
186 |
'remote_addr' => CleantalkHelper::ip_get(array('remote_addr'), false),
|
187 |
'REFFERRER' => isset($_SERVER['HTTP_REFERER']) ? htmlspecialchars($_SERVER['HTTP_REFERER']) : null,
|
188 |
'USER_AGENT' => isset($_SERVER['HTTP_USER_AGENT']) ? htmlspecialchars($_SERVER['HTTP_USER_AGENT']) : null,
|
inc/cleantalk-public.php
CHANGED
@@ -2733,8 +2733,8 @@ function ct_enqueue_scripts_public($hook){
|
|
2733 |
wp_enqueue_script('ct_public_gdpr', APBCT_URL_PATH.'/js/apbct-public--gdpr.js', array('jquery', 'ct_public'), APBCT_VERSION, false /*in header*/);
|
2734 |
|
2735 |
wp_localize_script('ct_public_gdpr', 'ctPublic', array(
|
2736 |
-
'gdpr_forms' =>
|
2737 |
-
'gdpr_text' => $apbct->settings['gdpr_text']
|
2738 |
));
|
2739 |
}
|
2740 |
|
2733 |
wp_enqueue_script('ct_public_gdpr', APBCT_URL_PATH.'/js/apbct-public--gdpr.js', array('jquery', 'ct_public'), APBCT_VERSION, false /*in header*/);
|
2734 |
|
2735 |
wp_localize_script('ct_public_gdpr', 'ctPublic', array(
|
2736 |
+
'gdpr_forms' => array(),
|
2737 |
+
'gdpr_text' => $apbct->settings['gdpr_text'] ? $apbct->settings['gdpr_text'] : __('By using this form you agree with the storage and processing of your data by using the Privacy Policy on this website.', 'cleantalk'),
|
2738 |
));
|
2739 |
}
|
2740 |
|
inc/cleantalk-settings.php
CHANGED
@@ -555,6 +555,12 @@ function apbct_settings__field__state(){
|
|
555 |
$color="black";
|
556 |
}
|
557 |
|
|
|
|
|
|
|
|
|
|
|
|
|
558 |
print '<div class="apbct_settings-field_wrapper" style="color:'.$color.'">';
|
559 |
|
560 |
print '<h2>'.__('Protection is active', 'cleantalk').'</h2>';
|
@@ -909,21 +915,7 @@ function apbct_settings__validate($settings) {
|
|
909 |
ct_sfw_update($settings['apikey']);
|
910 |
ct_sfw_send_logs($settings['apikey']);
|
911 |
}
|
912 |
-
|
913 |
-
//Turn off protection if account is disabled
|
914 |
-
if ($apbct->data['moderate'] == 0)
|
915 |
-
{
|
916 |
-
$settings['registrations_test'] = 0;
|
917 |
-
$settings['comments_test'] = 0;
|
918 |
-
$settings['contact_forms_test'] = 0;
|
919 |
-
$settings['general_contact_forms_test'] = 0;
|
920 |
-
$settings['wc_checkout_test'] = 0;
|
921 |
-
$settings['check_external'] = 0;
|
922 |
-
$settings['check_internal'] = 0;
|
923 |
-
$settings['bp_private_messages'] = 0;
|
924 |
-
$settings['general_postdata_test'] = 0;
|
925 |
-
}
|
926 |
-
|
927 |
// Updating brief data for dashboard widget
|
928 |
$apbct->data['brief_data'] = CleantalkAPI::method__get_antispam_report_breif($settings['apikey']);
|
929 |
|
555 |
$color="black";
|
556 |
}
|
557 |
|
558 |
+
if($apbct->data['moderate'] == 0){
|
559 |
+
$img = $path_to_img."no.png";
|
560 |
+
$img_no = $path_to_img."no.png";
|
561 |
+
$color="black";
|
562 |
+
}
|
563 |
+
|
564 |
print '<div class="apbct_settings-field_wrapper" style="color:'.$color.'">';
|
565 |
|
566 |
print '<h2>'.__('Protection is active', 'cleantalk').'</h2>';
|
915 |
ct_sfw_update($settings['apikey']);
|
916 |
ct_sfw_send_logs($settings['apikey']);
|
917 |
}
|
918 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
919 |
// Updating brief data for dashboard widget
|
920 |
$apbct->data['brief_data'] = CleantalkAPI::method__get_antispam_report_breif($settings['apikey']);
|
921 |
|
js/apbct-public.js
CHANGED
@@ -105,8 +105,6 @@ function apbct_ready(){
|
|
105 |
// Filter fields
|
106 |
if( getComputedStyle(elem).display === "none" || // hidden
|
107 |
getComputedStyle(elem).visibility === "hidden" || // hidden
|
108 |
-
getComputedStyle(elem).width === "0" || // hidden
|
109 |
-
getComputedStyle(elem).height === "0" || // hidden
|
110 |
getComputedStyle(elem).opacity === "0" || // hidden
|
111 |
elem.getAttribute("type") === "hidden" || // type == hidden
|
112 |
elem.getAttribute("type") === "submit" || // type == submit
|
105 |
// Filter fields
|
106 |
if( getComputedStyle(elem).display === "none" || // hidden
|
107 |
getComputedStyle(elem).visibility === "hidden" || // hidden
|
|
|
|
|
108 |
getComputedStyle(elem).opacity === "0" || // hidden
|
109 |
elem.getAttribute("type") === "hidden" || // type == hidden
|
110 |
elem.getAttribute("type") === "submit" || // type == submit
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: safronik
|
|
3 |
Tags: spam, antispam, protection, comments, firewall
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.0
|
6 |
-
Stable tag: 5.
|
7 |
License: GPLv2
|
8 |
|
9 |
Spam protection, antispam, all-in-one, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
|
@@ -28,7 +28,8 @@ No CAPTCHA, no questions, no animal counting, no puzzles, no math and no spam bo
|
|
28 |
11. Compatible with mobile users and devices.
|
29 |
12. Compatible with General Data Protection Regulation (GDPR) (EU).
|
30 |
13. Real-time email validation. Is email real or Not.
|
31 |
-
14.
|
|
|
32 |
|
33 |
|
34 |
= Public reviews =
|
@@ -239,6 +240,10 @@ Non-existing email addresses also entail several other problems for website owne
|
|
239 |
* the client will never receive any notifications from you (account activation letter, password recovery, email distribution, notifications, etc.),
|
240 |
* if you use email marketing for your clients, then a large number of nonexistent emails in the mailing list may result in your IP address being added to various blacklists of email servers.
|
241 |
|
|
|
|
|
|
|
|
|
242 |
= Translations =
|
243 |
* Albanian (sq_AL) - thanks to fjalaime https://wordpress.org/support/users/fjalaime/
|
244 |
* French (fr_FR) - thanks to Gilles Santacreu http://net-ik.net
|
@@ -547,6 +552,13 @@ Yes, it is. Please read this article,
|
|
547 |
10. Website's options.
|
548 |
|
549 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
550 |
= 5.111 December 13 2018 =
|
551 |
* Fix: Double request in JetPack contact form.
|
552 |
* Fix: Email notification about spam registration.
|
@@ -1744,6 +1756,13 @@ Yes, it is. Please read this article,
|
|
1744 |
* First version
|
1745 |
|
1746 |
== Upgrade Notice ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1747 |
= 5.111 December 13 2018 =
|
1748 |
* Fix: Double request in JetPack contact form.
|
1749 |
* Fix: Email notification about spam registration.
|
3 |
Tags: spam, antispam, protection, comments, firewall
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.0
|
6 |
+
Stable tag: 5.112
|
7 |
License: GPLv2
|
8 |
|
9 |
Spam protection, antispam, all-in-one, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
|
28 |
11. Compatible with mobile users and devices.
|
29 |
12. Compatible with General Data Protection Regulation (GDPR) (EU).
|
30 |
13. Real-time email validation. Is email real or Not.
|
31 |
+
14. Blocking disposable & temporary emails.
|
32 |
+
15. No Spam - No Google Penalties. Give your SEO boost.
|
33 |
|
34 |
|
35 |
= Public reviews =
|
240 |
* the client will never receive any notifications from you (account activation letter, password recovery, email distribution, notifications, etc.),
|
241 |
* if you use email marketing for your clients, then a large number of nonexistent emails in the mailing list may result in your IP address being added to various blacklists of email servers.
|
242 |
|
243 |
+
= Blocking disposable & temporary emails =
|
244 |
+
|
245 |
+
Block fake and suspicious users with disposable & temporary emails to improve email delivery. So, it also prevents malicious activity, spam bots, and internet trolls.
|
246 |
+
|
247 |
= Translations =
|
248 |
* Albanian (sq_AL) - thanks to fjalaime https://wordpress.org/support/users/fjalaime/
|
249 |
* French (fr_FR) - thanks to Gilles Santacreu http://net-ik.net
|
552 |
10. Website's options.
|
553 |
|
554 |
== Changelog ==
|
555 |
+
= 5.112 December 21 2018 =
|
556 |
+
* Fix: Woocommerce AJAX checkout form.
|
557 |
+
* Fix: Profile Builder Pro.
|
558 |
+
* Fix: DB structure improvements for WPMS.
|
559 |
+
* Spam filtering quality improved.
|
560 |
+
* Minor fixes.
|
561 |
+
|
562 |
= 5.111 December 13 2018 =
|
563 |
* Fix: Double request in JetPack contact form.
|
564 |
* Fix: Email notification about spam registration.
|
1756 |
* First version
|
1757 |
|
1758 |
== Upgrade Notice ==
|
1759 |
+
= 5.112 December 21 2018 =
|
1760 |
+
* Fix: Woocommerce AJAX checkout form.
|
1761 |
+
* Fix: Profile Builder Pro.
|
1762 |
+
* Fix: DB structure improvements for WPMS.
|
1763 |
+
* Spam filtering quality improved.
|
1764 |
+
* Minor fixes.
|
1765 |
+
|
1766 |
= 5.111 December 13 2018 =
|
1767 |
* Fix: Double request in JetPack contact form.
|
1768 |
* Fix: Email notification about spam registration.
|