Version Description
Dec 8 2020 = * Fix: Jetpack logic fixed. * Fix: AC UA table structure fixed.
Download this release
Release Info
Developer | glomberg |
Plugin | Spam protection, AntiSpam, FireWall by CleanTalk |
Version | 5.150.1 |
Comparing to | |
See all releases |
Code changes from version 5.150 to 5.150.1
- cleantalk.php +7 -7
- inc/cleantalk-public.php +45 -31
- inc/cleantalk-updater.php +20 -3
- lib/Cleantalk/Antispam/Integrations/ContactBank.php +22 -22
- readme.txt +5 -1
cleantalk.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Anti-Spam by CleanTalk
|
4 |
Plugin URI: https://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.150
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: https://cleantalk.org
|
9 |
Text Domain: cleantalk-spam-protect
|
@@ -685,11 +685,11 @@ function apbct_activation( $network = false ) {
|
|
685 |
// UA BL
|
686 |
$sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_ua_bl` (
|
687 |
`id` INT(11) NOT NULL,
|
688 |
-
`ua_template` VARCHAR(
|
689 |
`ua_status` TINYINT(1) NULL DEFAULT NULL,
|
690 |
PRIMARY KEY ( `id` ),
|
691 |
-
INDEX ( `ua_template` )
|
692 |
-
);';
|
693 |
|
694 |
// SFW log
|
695 |
$sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_sfw_logs` (
|
@@ -808,11 +808,11 @@ function apbct_activation__new_blog($blog_id, $user_id, $domain, $path, $site_id
|
|
808 |
// UA BL
|
809 |
$sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_ua_bl` (
|
810 |
`id` INT(11) NOT NULL,
|
811 |
-
`ua_template` VARCHAR(
|
812 |
`ua_status` TINYINT(1) NULL DEFAULT NULL,
|
813 |
PRIMARY KEY ( `id` ),
|
814 |
-
INDEX ( `ua_template` )
|
815 |
-
);';
|
816 |
|
817 |
|
818 |
// SFW log
|
3 |
Plugin Name: Anti-Spam by CleanTalk
|
4 |
Plugin URI: https://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.150.1
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: https://cleantalk.org
|
9 |
Text Domain: cleantalk-spam-protect
|
685 |
// UA BL
|
686 |
$sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_ua_bl` (
|
687 |
`id` INT(11) NOT NULL,
|
688 |
+
`ua_template` VARCHAR(255) NULL DEFAULT NULL,
|
689 |
`ua_status` TINYINT(1) NULL DEFAULT NULL,
|
690 |
PRIMARY KEY ( `id` ),
|
691 |
+
INDEX ( `ua_template` )
|
692 |
+
) DEFAULT CHARSET=utf8;'; // Don't remove the default charset!
|
693 |
|
694 |
// SFW log
|
695 |
$sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_sfw_logs` (
|
808 |
// UA BL
|
809 |
$sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_ua_bl` (
|
810 |
`id` INT(11) NOT NULL,
|
811 |
+
`ua_template` VARCHAR(255) NULL DEFAULT NULL,
|
812 |
`ua_status` TINYINT(1) NULL DEFAULT NULL,
|
813 |
PRIMARY KEY ( `id` ),
|
814 |
+
INDEX ( `ua_template` )
|
815 |
+
) DEFAULT CHARSET=utf8;'; // Don't remove the default charset!
|
816 |
|
817 |
|
818 |
// SFW log
|
inc/cleantalk-public.php
CHANGED
@@ -143,30 +143,36 @@ function apbct_init() {
|
|
143 |
|
144 |
|
145 |
// JetPack Contact form
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
|
171 |
// WP Maintenance Mode (wpmm)
|
172 |
add_action('wpmm_head', 'apbct_form__wpmm__addField', 1);
|
@@ -1385,15 +1391,17 @@ function ct_preprocess_comment($comment) {
|
|
1385 |
$ct_stop_words = $ct_result->stop_words;
|
1386 |
|
1387 |
$err_text = '<center>' . ((defined('CLEANTALK_DISABLE_BLOCKING_TITLE') && CLEANTALK_DISABLE_BLOCKING_TITLE == true) ? '' : '<b style="color: #49C73B;">Clean</b><b style="color: #349ebf;">Talk.</b> ') . __('Spam protection', 'cleantalk-spam-protect') . "</center><br><br>\n" . $ct_result->comment;
|
1388 |
-
$
|
|
|
|
|
1389 |
|
1390 |
// Terminate. Definitely spam.
|
1391 |
if($ct_result->stop_queue == 1)
|
1392 |
-
wp_die($err_text, 'Blacklisted', array('response' => 200, 'back_link' =>
|
1393 |
|
1394 |
// Terminate by user's setting.
|
1395 |
if($ct_result->spam == 3)
|
1396 |
-
wp_die($err_text, 'Blacklisted', array('response' => 200, 'back_link' =>
|
1397 |
|
1398 |
// Trash comment.
|
1399 |
if($ct_result->spam == 2){
|
@@ -1538,12 +1546,14 @@ function apbct_comment__wordpress__show_blacklists( $notify_message, $comment_id
|
|
1538 |
*/
|
1539 |
function ct_die($comment_id, $comment_status) {
|
1540 |
|
1541 |
-
global $ct_comment;
|
1542 |
|
1543 |
do_action( 'apbct_pre_block_page', $ct_comment );
|
1544 |
|
1545 |
$err_text = '<center>' . ((defined('CLEANTALK_DISABLE_BLOCKING_TITLE') && CLEANTALK_DISABLE_BLOCKING_TITLE == true) ? '' : '<b style="color: #49C73B;">Clean</b><b style="color: #349ebf;">Talk.</b> ') . __('Spam protection', 'cleantalk-spam-protect') . "</center><br><br>\n" . $ct_comment;
|
1546 |
-
$
|
|
|
|
|
1547 |
if(isset($_POST['et_pb_contact_email']))
|
1548 |
{
|
1549 |
$mes='<div id="et_pb_contact_form_1" class="et_pb_contact_form_container clearfix"><h1 class="et_pb_contact_main_title">Blacklisted</h1><div class="et-pb-contact-message"><p>'.$ct_comment.'</p></div></div>';
|
@@ -1551,7 +1561,7 @@ function ct_die($comment_id, $comment_status) {
|
|
1551 |
}
|
1552 |
else
|
1553 |
{
|
1554 |
-
wp_die($err_text, 'Blacklisted', array('response' => 200, 'back_link' =>
|
1555 |
}
|
1556 |
}
|
1557 |
|
@@ -1561,9 +1571,13 @@ function ct_die($comment_id, $comment_status) {
|
|
1561 |
*/
|
1562 |
function ct_die_extended($comment_body) {
|
1563 |
|
|
|
|
|
1564 |
$err_text = '<center>' . ((defined('CLEANTALK_DISABLE_BLOCKING_TITLE') && CLEANTALK_DISABLE_BLOCKING_TITLE == true) ? '' : '<b style="color: #49C73B;">Clean</b><b style="color: #349ebf;">Talk.</b> ') . __('Spam protection', 'cleantalk-spam-protect') . "</center><br><br>\n" . $comment_body;
|
|
|
1565 |
$err_text .= '<script>setTimeout("history.back()", 5000);</script>';
|
1566 |
-
|
|
|
1567 |
}
|
1568 |
|
1569 |
/**
|
143 |
|
144 |
|
145 |
// JetPack Contact form
|
146 |
+
$jetpack_active_modules = false;
|
147 |
+
if(defined('JETPACK__VERSION'))
|
148 |
+
{
|
149 |
+
// Checking Jetpack contact form
|
150 |
+
if(isset($_POST['action']) && $_POST['action'] == 'grunion-contact-form' ){
|
151 |
+
if(JETPACK__VERSION=='3.4-beta')
|
152 |
+
{
|
153 |
+
add_filter('contact_form_is_spam', 'ct_contact_form_is_spam');
|
154 |
+
}
|
155 |
+
else if(JETPACK__VERSION=='3.4-beta2'||JETPACK__VERSION>='3.4')
|
156 |
+
{
|
157 |
+
add_filter('jetpack_contact_form_is_spam', 'ct_contact_form_is_spam_jetpack',50,2);
|
158 |
+
}
|
159 |
+
else
|
160 |
+
{
|
161 |
+
add_filter('contact_form_is_spam', 'ct_contact_form_is_spam');
|
162 |
+
}
|
163 |
+
|
164 |
+
}else {
|
165 |
+
add_filter('grunion_contact_form_field_html', 'ct_grunion_contact_form_field_html', 10, 2);
|
166 |
+
}
|
167 |
+
|
168 |
+
// Checking Jetpack comments form
|
169 |
+
$jetpack_active_modules = get_option('jetpack_active_modules');
|
170 |
+
if ((class_exists( 'Jetpack', false) && $jetpack_active_modules && in_array('comments', $jetpack_active_modules)))
|
171 |
+
{
|
172 |
+
$ct_jp_comments = true;
|
173 |
+
}
|
174 |
+
|
175 |
+
}
|
176 |
|
177 |
// WP Maintenance Mode (wpmm)
|
178 |
add_action('wpmm_head', 'apbct_form__wpmm__addField', 1);
|
1391 |
$ct_stop_words = $ct_result->stop_words;
|
1392 |
|
1393 |
$err_text = '<center>' . ((defined('CLEANTALK_DISABLE_BLOCKING_TITLE') && CLEANTALK_DISABLE_BLOCKING_TITLE == true) ? '' : '<b style="color: #49C73B;">Clean</b><b style="color: #349ebf;">Talk.</b> ') . __('Spam protection', 'cleantalk-spam-protect') . "</center><br><br>\n" . $ct_result->comment;
|
1394 |
+
if( ! $ct_jp_comments ) {
|
1395 |
+
$err_text .= '<script>setTimeout("history.back()", 5000);</script>';
|
1396 |
+
}
|
1397 |
|
1398 |
// Terminate. Definitely spam.
|
1399 |
if($ct_result->stop_queue == 1)
|
1400 |
+
wp_die($err_text, 'Blacklisted', array('response' => 200, 'back_link' => ! $ct_jp_comments ));
|
1401 |
|
1402 |
// Terminate by user's setting.
|
1403 |
if($ct_result->spam == 3)
|
1404 |
+
wp_die($err_text, 'Blacklisted', array('response' => 200, 'back_link' => ! $ct_jp_comments));
|
1405 |
|
1406 |
// Trash comment.
|
1407 |
if($ct_result->spam == 2){
|
1546 |
*/
|
1547 |
function ct_die($comment_id, $comment_status) {
|
1548 |
|
1549 |
+
global $ct_comment, $ct_jp_comments;
|
1550 |
|
1551 |
do_action( 'apbct_pre_block_page', $ct_comment );
|
1552 |
|
1553 |
$err_text = '<center>' . ((defined('CLEANTALK_DISABLE_BLOCKING_TITLE') && CLEANTALK_DISABLE_BLOCKING_TITLE == true) ? '' : '<b style="color: #49C73B;">Clean</b><b style="color: #349ebf;">Talk.</b> ') . __('Spam protection', 'cleantalk-spam-protect') . "</center><br><br>\n" . $ct_comment;
|
1554 |
+
if( ! $ct_jp_comments ) {
|
1555 |
+
$err_text .= '<script>setTimeout("history.back()", 5000);</script>';
|
1556 |
+
}
|
1557 |
if(isset($_POST['et_pb_contact_email']))
|
1558 |
{
|
1559 |
$mes='<div id="et_pb_contact_form_1" class="et_pb_contact_form_container clearfix"><h1 class="et_pb_contact_main_title">Blacklisted</h1><div class="et-pb-contact-message"><p>'.$ct_comment.'</p></div></div>';
|
1561 |
}
|
1562 |
else
|
1563 |
{
|
1564 |
+
wp_die($err_text, 'Blacklisted', array('response' => 200, 'back_link' => ! $ct_jp_comments));
|
1565 |
}
|
1566 |
}
|
1567 |
|
1571 |
*/
|
1572 |
function ct_die_extended($comment_body) {
|
1573 |
|
1574 |
+
global $ct_jp_comments;
|
1575 |
+
|
1576 |
$err_text = '<center>' . ((defined('CLEANTALK_DISABLE_BLOCKING_TITLE') && CLEANTALK_DISABLE_BLOCKING_TITLE == true) ? '' : '<b style="color: #49C73B;">Clean</b><b style="color: #349ebf;">Talk.</b> ') . __('Spam protection', 'cleantalk-spam-protect') . "</center><br><br>\n" . $comment_body;
|
1577 |
+
if( ! $ct_jp_comments ) {
|
1578 |
$err_text .= '<script>setTimeout("history.back()", 5000);</script>';
|
1579 |
+
}
|
1580 |
+
wp_die($err_text, 'Blacklisted', array('response' => 200, 'back_link' => ! $ct_jp_comments));
|
1581 |
}
|
1582 |
|
1583 |
/**
|
inc/cleantalk-updater.php
CHANGED
@@ -640,11 +640,11 @@ function apbct_update_to_5_149_2() {
|
|
640 |
|
641 |
$sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_ua_bl` (
|
642 |
`id` INT(11) NOT NULL,
|
643 |
-
`ua_template` VARCHAR(
|
644 |
`ua_status` TINYINT(1) NULL DEFAULT NULL,
|
645 |
PRIMARY KEY ( `id` ),
|
646 |
-
INDEX ( `ua_template` )
|
647 |
-
);';
|
648 |
|
649 |
$sqls[] = 'DROP TABLE IF EXISTS `%scleantalk_sfw_logs`;';
|
650 |
|
@@ -689,3 +689,20 @@ function apbct_update_to_5_150_0() {
|
|
689 |
}
|
690 |
|
691 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
640 |
|
641 |
$sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_ua_bl` (
|
642 |
`id` INT(11) NOT NULL,
|
643 |
+
`ua_template` VARCHAR(255) NULL DEFAULT NULL,
|
644 |
`ua_status` TINYINT(1) NULL DEFAULT NULL,
|
645 |
PRIMARY KEY ( `id` ),
|
646 |
+
INDEX ( `ua_template` )
|
647 |
+
) DEFAULT CHARSET=utf8;'; // Don't remove the default charset!
|
648 |
|
649 |
$sqls[] = 'DROP TABLE IF EXISTS `%scleantalk_sfw_logs`;';
|
650 |
|
689 |
}
|
690 |
|
691 |
}
|
692 |
+
|
693 |
+
function apbct_update_to_5_150_1() {
|
694 |
+
|
695 |
+
global $apbct;
|
696 |
+
|
697 |
+
// UA BL with default charset
|
698 |
+
$sqls[] = 'DROP TABLE IF EXISTS `%scleantalk_ua_bl`;';
|
699 |
+
$sqls[] = 'CREATE TABLE IF NOT EXISTS `%scleantalk_ua_bl` (
|
700 |
+
`id` INT(11) NOT NULL,
|
701 |
+
`ua_template` VARCHAR(255) NULL DEFAULT NULL,
|
702 |
+
`ua_status` TINYINT(1) NULL DEFAULT NULL,
|
703 |
+
PRIMARY KEY ( `id` ),
|
704 |
+
INDEX ( `ua_template` )
|
705 |
+
) DEFAULT CHARSET=utf8;'; // Don't remove the default charset!
|
706 |
+
|
707 |
+
apbct_activation__create_tables( $sqls, $apbct->db_prefix );
|
708 |
+
}
|
lib/Cleantalk/Antispam/Integrations/ContactBank.php
CHANGED
@@ -1,23 +1,23 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
namespace Cleantalk\Antispam\Integrations;
|
5 |
-
|
6 |
-
|
7 |
-
class ContactBank extends IntegrationBase
|
8 |
-
{
|
9 |
-
|
10 |
-
function getDataForChecking( $argument )
|
11 |
-
{
|
12 |
-
if( isset( $_REQUEST['param'] ) ) {
|
13 |
-
parse_str( isset( $_REQUEST['data'] ) ? base64_decode( $_REQUEST['data'] ) : '', $form_data );
|
14 |
-
return ct_get_fields_any($form_data);
|
15 |
-
}
|
16 |
-
return null;
|
17 |
-
}
|
18 |
-
|
19 |
-
function doBlock( $message )
|
20 |
-
{
|
21 |
-
die(json_encode(array('apbct' => array('blocked' => true, 'comment' => $message,))));
|
22 |
-
}
|
23 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
namespace Cleantalk\Antispam\Integrations;
|
5 |
+
|
6 |
+
|
7 |
+
class ContactBank extends IntegrationBase
|
8 |
+
{
|
9 |
+
|
10 |
+
function getDataForChecking( $argument )
|
11 |
+
{
|
12 |
+
if( isset( $_REQUEST['param'] ) ) {
|
13 |
+
parse_str( isset( $_REQUEST['data'] ) ? base64_decode( $_REQUEST['data'] ) : '', $form_data );
|
14 |
+
return ct_get_fields_any($form_data);
|
15 |
+
}
|
16 |
+
return null;
|
17 |
+
}
|
18 |
+
|
19 |
+
function doBlock( $message )
|
20 |
+
{
|
21 |
+
die(json_encode(array('apbct' => array('blocked' => true, 'comment' => $message,))));
|
22 |
+
}
|
23 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: spam, antispam, anti-spam, comments, firewall
|
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.6
|
6 |
Requires PHP: 5.4
|
7 |
-
Stable tag: 5.150
|
8 |
License: GPLv2
|
9 |
|
10 |
Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
|
@@ -580,6 +580,10 @@ If your website has forms that send data to external sources, you can enable opt
|
|
580 |
|
581 |
== Changelog ==
|
582 |
|
|
|
|
|
|
|
|
|
583 |
= 5.150 Dec 3 2020 =
|
584 |
* Fix: Prevent skip checking woocommerce registration during checkout.
|
585 |
* Fix: skip gravity multipage checking.
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.6
|
6 |
Requires PHP: 5.4
|
7 |
+
Stable tag: 5.150.1
|
8 |
License: GPLv2
|
9 |
|
10 |
Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
|
580 |
|
581 |
== Changelog ==
|
582 |
|
583 |
+
= 5.150.1 Dec 8 2020 =
|
584 |
+
* Fix: Jetpack logic fixed.
|
585 |
+
* Fix: AC UA table structure fixed.
|
586 |
+
|
587 |
= 5.150 Dec 3 2020 =
|
588 |
* Fix: Prevent skip checking woocommerce registration during checkout.
|
589 |
* Fix: skip gravity multipage checking.
|