Version Description
November 3 2017 = * Spam protection improved. * Improved filtration quality for WooCommerce checkout. * Minor fixes for SpamFireWall.
Download this release
Release Info
Developer | shagimuratov |
Plugin | Spam protection, AntiSpam, FireWall by CleanTalk |
Version | 5.80 |
Comparing to | |
See all releases |
Code changes from version 5.79 to 5.80
- cleantalk.php +40 -40
- inc/cleantalk-admin.php +16 -16
- inc/cleantalk-common.php +7 -3
- inc/cleantalk-public.php +56 -28
- inc/sfw_die_page.html +3 -6
- lib/CleantalkSFW.php +2 -2
- readme.txt +37 -14
cleantalk.php
CHANGED
@@ -3,13 +3,13 @@
|
|
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. Formerly Anti-Spam by CleanTalk.
|
6 |
-
Version: 5.
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: http://cleantalk.org
|
9 |
*/
|
10 |
|
11 |
-
$cleantalk_plugin_version='5.
|
12 |
-
$ct_agent_version = 'wordpress-
|
13 |
$cleantalk_executed=false;
|
14 |
|
15 |
define('CLEANTALK_REMOTE_CALL_SLEEP', 10); // Minimum time between remote call
|
@@ -65,6 +65,43 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
65 |
if(isset($_SERVER['REQUEST_URI']) && stripos($_SERVER['REQUEST_URI'],'admin-ajax.php')!==false && sizeof($_POST)>0 && isset($_GET['action']) && $_GET['action']=='ninja_forms_ajax_submit')
|
66 |
$_POST['action']='ninja_forms_ajax_submit';
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
// SFW start
|
69 |
$value = (isset($ct_options['spam_firewall']) ? intval($ct_options['spam_firewall']) : 0);
|
70 |
/*
|
@@ -147,44 +184,7 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
147 |
}
|
148 |
unset($is_sfw_check, $sfw, $sfw_ip, $ct_cur_ip);
|
149 |
}
|
150 |
-
|
151 |
-
// Remote calls
|
152 |
-
if(isset($_GET['spbc_remote_call_token'], $_GET['spbc_remote_call_action'], $_GET['plugin_name']) && ($_GET['plugin_name'] == 'antispam' || $_GET['plugin_name'] == 'anti-spam')){
|
153 |
-
|
154 |
-
if(isset($ct_data['last_remote_call']) && time() - $ct_data['last_remote_call'] < CLEANTALK_REMOTE_CALL_SLEEP){
|
155 |
-
echo "FAIL TOO_MANY_ATTEMPTS";
|
156 |
-
die();
|
157 |
-
}else{
|
158 |
-
$ct_data['last_remote_call'] = time();
|
159 |
-
update_option('cleantalk_data', $ct_data);
|
160 |
-
}
|
161 |
-
|
162 |
-
$spbc_remote_call_token = md5($ct_options['apikey']);
|
163 |
|
164 |
-
if($_GET['spbc_remote_call_token'] == $spbc_remote_call_token){
|
165 |
-
|
166 |
-
if($_GET['spbc_remote_call_action'] == 'close_renew_banner'){
|
167 |
-
$ct_data['show_ct_notice_trial'] = 0;
|
168 |
-
$ct_data['show_ct_notice_renew'] = 0;
|
169 |
-
update_option('cleantalk_data', $ct_data);
|
170 |
-
CleantalkCron::updateTask('check_account_status', 'ct_account_status_check', 86400);
|
171 |
-
echo "OK";
|
172 |
-
die();
|
173 |
-
}elseif($_GET['spbc_remote_call_action'] == 'sfw_update'){
|
174 |
-
$rc_result = ct_sfw_update();
|
175 |
-
echo $rc_result === true ? 'OK' : 'FAIL '.$rc_result;
|
176 |
-
die();
|
177 |
-
}elseif($_GET['spbc_remote_call_action'] == 'sfw_send_logs'){
|
178 |
-
$rc_result = ct_sfw_send_logs();
|
179 |
-
echo $rc_result === true ? 'OK' : 'FAIL '.$rc_result;
|
180 |
-
die();
|
181 |
-
}
|
182 |
-
}else{
|
183 |
-
echo "FAIL WRONG_TOKEN";
|
184 |
-
die();
|
185 |
-
}
|
186 |
-
}
|
187 |
-
|
188 |
// Activation/deactivation functions must be in main plugin file.
|
189 |
// http://codex.wordpress.org/Function_Reference/register_activation_hook
|
190 |
register_activation_hook( __FILE__, 'apbct_activation' );
|
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. Formerly Anti-Spam by CleanTalk.
|
6 |
+
Version: 5.80
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: http://cleantalk.org
|
9 |
*/
|
10 |
|
11 |
+
$cleantalk_plugin_version='5.80';
|
12 |
+
$ct_agent_version = 'wordpress-580';
|
13 |
$cleantalk_executed=false;
|
14 |
|
15 |
define('CLEANTALK_REMOTE_CALL_SLEEP', 10); // Minimum time between remote call
|
65 |
if(isset($_SERVER['REQUEST_URI']) && stripos($_SERVER['REQUEST_URI'],'admin-ajax.php')!==false && sizeof($_POST)>0 && isset($_GET['action']) && $_GET['action']=='ninja_forms_ajax_submit')
|
66 |
$_POST['action']='ninja_forms_ajax_submit';
|
67 |
|
68 |
+
// Remote calls
|
69 |
+
if(isset($_GET['spbc_remote_call_token'], $_GET['spbc_remote_call_action'], $_GET['plugin_name']) && ($_GET['plugin_name'] == 'antispam' || $_GET['plugin_name'] == 'anti-spam')){
|
70 |
+
|
71 |
+
if(isset($ct_data['last_remote_call']) && time() - $ct_data['last_remote_call'] < CLEANTALK_REMOTE_CALL_SLEEP){
|
72 |
+
echo "FAIL TOO_MANY_ATTEMPTS";
|
73 |
+
die();
|
74 |
+
}else{
|
75 |
+
$ct_data['last_remote_call'] = time();
|
76 |
+
update_option('cleantalk_data', $ct_data);
|
77 |
+
}
|
78 |
+
|
79 |
+
$spbc_remote_call_token = md5($ct_options['apikey']);
|
80 |
+
|
81 |
+
if($_GET['spbc_remote_call_token'] == $spbc_remote_call_token){
|
82 |
+
|
83 |
+
if($_GET['spbc_remote_call_action'] == 'close_renew_banner'){
|
84 |
+
$ct_data['show_ct_notice_trial'] = 0;
|
85 |
+
$ct_data['show_ct_notice_renew'] = 0;
|
86 |
+
update_option('cleantalk_data', $ct_data);
|
87 |
+
CleantalkCron::updateTask('check_account_status', 'ct_account_status_check', 86400);
|
88 |
+
echo "OK";
|
89 |
+
die();
|
90 |
+
}elseif($_GET['spbc_remote_call_action'] == 'sfw_update'){
|
91 |
+
$rc_result = ct_sfw_update();
|
92 |
+
echo $rc_result === true ? 'OK' : 'FAIL '.$rc_result;
|
93 |
+
die();
|
94 |
+
}elseif($_GET['spbc_remote_call_action'] == 'sfw_send_logs'){
|
95 |
+
$rc_result = ct_sfw_send_logs();
|
96 |
+
echo $rc_result === true ? 'OK' : 'FAIL '.$rc_result;
|
97 |
+
die();
|
98 |
+
}
|
99 |
+
}else{
|
100 |
+
echo "FAIL WRONG_TOKEN";
|
101 |
+
die();
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
// SFW start
|
106 |
$value = (isset($ct_options['spam_firewall']) ? intval($ct_options['spam_firewall']) : 0);
|
107 |
/*
|
184 |
}
|
185 |
unset($is_sfw_check, $sfw, $sfw_ip, $ct_cur_ip);
|
186 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
// Activation/deactivation functions must be in main plugin file.
|
189 |
// http://codex.wordpress.org/Function_Reference/register_activation_hook
|
190 |
register_activation_hook( __FILE__, 'apbct_activation' );
|
inc/cleantalk-admin.php
CHANGED
@@ -1651,6 +1651,21 @@ function apbct_settings_page() {
|
|
1651 |
}
|
1652 |
else
|
1653 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1654 |
?>
|
1655 |
<form action="options.php" method="post">
|
1656 |
<?php settings_fields('cleantalk_settings'); ?>
|
@@ -1673,22 +1688,7 @@ function apbct_settings_page() {
|
|
1673 |
if(substr(get_locale(), 0, 2) != 'en'){
|
1674 |
require_once(CLEANTALK_PLUGIN_DIR.'templates/translate_banner.php');
|
1675 |
printf($ct_translate_banner_template, substr(get_locale(), 0, 2));
|
1676 |
-
}
|
1677 |
-
echo "<br /><br /><br />";
|
1678 |
-
|
1679 |
-
echo "<div>";
|
1680 |
-
|
1681 |
-
echo __("CleanTalk's tech support:", 'cleantalk')
|
1682 |
-
." "
|
1683 |
-
.'<a target="_blank" href="https://wordpress.org/support/plugin/cleantalk-spam-protect">Wordpress.org</a>.'
|
1684 |
-
// .' <a href="https://community.cleantalk.org/viewforum.php?f=25" target="_blank">'.__("Tech forum", 'cleantalk').'</a>'
|
1685 |
-
// .($user_token ? ", <a href='https://cleantalk.org/my/support?user_token=$user_token&cp_mode=antispam' target='_blank'>".__("Service support ", 'cleantalk').'</a>' : '').
|
1686 |
-
.'<br>';
|
1687 |
-
echo __('Plugin Homepage at', 'cleantalk').' <a href="http://cleantalk.org" target="_blank">cleantalk.org</a>.<br />';
|
1688 |
-
echo __('Use s@cleantalk.org to test plugin in any WordPress form.', 'cleantalk').'<br>';
|
1689 |
-
echo __('CleanTalk is registered Trademark. All rights reserved.', 'cleantalk');
|
1690 |
-
|
1691 |
-
echo "</div>";
|
1692 |
}
|
1693 |
|
1694 |
/**
|
1651 |
}
|
1652 |
else
|
1653 |
{
|
1654 |
+
echo '<div style="float: right; padding: 0 15px; font-size: 13px;">';
|
1655 |
+
|
1656 |
+
echo __('CleanTalk\'s tech support:', 'cleantalk')
|
1657 |
+
.' '
|
1658 |
+
.'<a target="_blank" href="https://wordpress.org/support/plugin/cleantalk-spam-protect">Wordpress.org</a>.'
|
1659 |
+
// .' <a href="https://community.cleantalk.org/viewforum.php?f=25" target="_blank">'.__("Tech forum", 'cleantalk').'</a>'
|
1660 |
+
// .($user_token ? ", <a href='https://cleantalk.org/my/support?user_token=$user_token&cp_mode=antispam' target='_blank'>".__("Service support ", 'cleantalk').'</a>' : '').
|
1661 |
+
.'<br>';
|
1662 |
+
echo __('Plugin Homepage at', 'cleantalk').' <a href="http://cleantalk.org" target="_blank">cleantalk.org</a>.<br />';
|
1663 |
+
echo __('Use s@cleantalk.org to test plugin in any WordPress form.', 'cleantalk').'<br>';
|
1664 |
+
echo __('CleanTalk is registered Trademark. All rights reserved.', 'cleantalk');
|
1665 |
+
echo '<br />';
|
1666 |
+
echo '<b style="display: inline-block; margin-top: 10px;">'.sprintf(__('Do you like CleanTalk? %sPost your feedback here%s.', 'cleantalk'), '<a href="https://wordpress.org/support/plugin/cleantalk-spam-protect/reviews/#new-post" target="_blank">', '</a>').'</b>';
|
1667 |
+
|
1668 |
+
echo "</div>";
|
1669 |
?>
|
1670 |
<form action="options.php" method="post">
|
1671 |
<?php settings_fields('cleantalk_settings'); ?>
|
1688 |
if(substr(get_locale(), 0, 2) != 'en'){
|
1689 |
require_once(CLEANTALK_PLUGIN_DIR.'templates/translate_banner.php');
|
1690 |
printf($ct_translate_banner_template, substr(get_locale(), 0, 2));
|
1691 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1692 |
}
|
1693 |
|
1694 |
/**
|
inc/cleantalk-common.php
CHANGED
@@ -306,10 +306,14 @@ function get_sender_info($cookie_submit_time = false, $field_count = false) {
|
|
306 |
);
|
307 |
|
308 |
if($field_count){
|
309 |
-
$
|
310 |
-
? $_COOKIE['
|
311 |
: null;
|
312 |
-
$
|
|
|
|
|
|
|
|
|
313 |
}
|
314 |
|
315 |
return $sender_info;
|
306 |
);
|
307 |
|
308 |
if($field_count){
|
309 |
+
$visible_inputs_count = !empty($_COOKIE['apbct_visible_fields_count'])
|
310 |
+
? $_COOKIE['apbct_visible_fields_count']
|
311 |
: null;
|
312 |
+
$apbct_visible_fields = !empty($_COOKIE['apbct_visible_fields'])
|
313 |
+
? json_decode(stripslashes($_COOKIE['apbct_visible_fields']), true)
|
314 |
+
: null;
|
315 |
+
$sender_info['form_visible_inputs'] = $visible_inputs_count;
|
316 |
+
$sender_info['apbct_visible_fields'] = json_encode($apbct_visible_fields);
|
317 |
}
|
318 |
|
319 |
return $sender_info;
|
inc/cleantalk-public.php
CHANGED
@@ -713,7 +713,17 @@ function ct_add_mouse_tracking($return_string = false){
|
|
713 |
function ctSetCookieSec(c_name, value) {
|
714 |
document.cookie = c_name + "=" + encodeURIComponent(value) + "; path=/";
|
715 |
}
|
716 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
717 |
ctSetCookieSec("ct_ps_timestamp", Math.floor(new Date().getTime()/1000));
|
718 |
ctSetCookieSec("ct_fkp_timestamp", "0");
|
719 |
ctSetCookieSec("ct_pointer_data", "0");
|
@@ -760,35 +770,50 @@ function ct_add_mouse_tracking($return_string = false){
|
|
760 |
|
761 |
//Stop mouse observing function
|
762 |
function ctMouseStopData(){
|
763 |
-
|
764 |
-
window.removeEventListener("mousemove", ctFunctionMouseMove);
|
765 |
-
}else{
|
766 |
-
window.detachEvent("onmousemove", ctFunctionMouseMove);
|
767 |
-
}
|
768 |
clearInterval(ctMouseReadInterval);
|
769 |
clearInterval(ctMouseWriteDataInterval);
|
770 |
}
|
771 |
|
772 |
//Stop key listening function
|
773 |
function ctKeyStopStopListening(){
|
774 |
-
|
775 |
-
|
776 |
-
window.removeEventListener("keydown", ctFunctionFirstKey);
|
777 |
-
}else{
|
778 |
-
window.detachEvent("mousedown", ctFunctionFirstKey);
|
779 |
-
window.detachEvent("keydown", ctFunctionFirstKey);
|
780 |
-
}
|
781 |
}
|
782 |
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
791 |
}
|
|
|
792 |
</script>';
|
793 |
|
794 |
if($return_string)
|
@@ -1954,7 +1979,7 @@ function ct_wpcf7_form_elements($html) {
|
|
1954 |
}
|
1955 |
|
1956 |
$html .= ct_add_hidden_fields(true, $ct_checkjs_cf7, true);
|
1957 |
-
|
1958 |
ct_setup_page_timer();
|
1959 |
|
1960 |
return $html;
|
@@ -2036,7 +2061,7 @@ function ct_wpcf7_spam($param) {
|
|
2036 |
'sender_nickname' => $sender_nickname,
|
2037 |
'post_info' => $post_info,
|
2038 |
'checkjs' => $checkjs
|
2039 |
-
), true);
|
2040 |
$ct = $ct_base_call_result['ct'];
|
2041 |
$ct_result = $ct_base_call_result['ct_result'];
|
2042 |
|
@@ -2484,6 +2509,12 @@ function ct_contact_form_validate() {
|
|
2484 |
if (isset($_COOKIE[LOGGED_IN_COOKIE]) && $ct_options['protect_logged_in'] != 1)
|
2485 |
return null;
|
2486 |
|
|
|
|
|
|
|
|
|
|
|
|
|
2487 |
// Skip the test if it's WooCommerce and the checkout test unset
|
2488 |
if(
|
2489 |
(
|
@@ -2494,13 +2525,10 @@ function ct_contact_form_validate() {
|
|
2494 |
$ct_options['wc_checkout_test'] == 0
|
2495 |
){
|
2496 |
return null;
|
|
|
|
|
2497 |
}
|
2498 |
|
2499 |
-
$_POST=ct_filter_array($_POST);
|
2500 |
-
|
2501 |
-
$checkjs = js_test('ct_checkjs', $_COOKIE, true);
|
2502 |
-
|
2503 |
-
$post_info['comment_type'] = 'feedback_general_contact_form';
|
2504 |
$post_info = json_encode($post_info);
|
2505 |
if ($post_info === false) {
|
2506 |
$post_info = '';
|
713 |
function ctSetCookieSec(c_name, value) {
|
714 |
document.cookie = c_name + "=" + encodeURIComponent(value) + "; path=/";
|
715 |
}
|
716 |
+
|
717 |
+
function apbct_attach_event_handler(elem, event, callback){
|
718 |
+
if(typeof window.addEventListener == "function") elem.addEventListener(event, callback);
|
719 |
+
else elem.attachEvent(event, callback);
|
720 |
+
}
|
721 |
+
|
722 |
+
function apbct_remove_event_handler(elem, event, callback){
|
723 |
+
if(typeof window.removeEventListener == "function") elem.removeEventListener(event, callback);
|
724 |
+
else elem.detachEvent(event, callback);
|
725 |
+
}
|
726 |
+
|
727 |
ctSetCookieSec("ct_ps_timestamp", Math.floor(new Date().getTime()/1000));
|
728 |
ctSetCookieSec("ct_fkp_timestamp", "0");
|
729 |
ctSetCookieSec("ct_pointer_data", "0");
|
770 |
|
771 |
//Stop mouse observing function
|
772 |
function ctMouseStopData(){
|
773 |
+
apbct_remove_event_handler(window, "mousemove", ctFunctionMouseMove);
|
|
|
|
|
|
|
|
|
774 |
clearInterval(ctMouseReadInterval);
|
775 |
clearInterval(ctMouseWriteDataInterval);
|
776 |
}
|
777 |
|
778 |
//Stop key listening function
|
779 |
function ctKeyStopStopListening(){
|
780 |
+
apbct_remove_event_handler(window, "mousedown", ctFunctionFirstKey);
|
781 |
+
apbct_remove_event_handler(window, "keydown", ctFunctionFirstKey);
|
|
|
|
|
|
|
|
|
|
|
782 |
}
|
783 |
|
784 |
+
apbct_attach_event_handler(window, "mousemove", ctFunctionMouseMove);
|
785 |
+
apbct_attach_event_handler(window, "mousedown", ctFunctionFirstKey);
|
786 |
+
apbct_attach_event_handler(window, "keydown", ctFunctionFirstKey);
|
787 |
+
|
788 |
+
// Ready function
|
789 |
+
function apbct_ready(){
|
790 |
+
ctSetCookieSec("apbct_field_count", 0);
|
791 |
+
for(var i=0; i < document.forms.length; i++){
|
792 |
+
var form = document.forms[i];
|
793 |
+
form.onsubmit = function(){
|
794 |
+
var apbct_vf = {apbct_visible_fields: ""};
|
795 |
+
for(var j=0, elem_count=form.elements.length; j < form.elements.length; j++){
|
796 |
+
var elem = form.elements[j];
|
797 |
+
if( getComputedStyle(elem).display == "none" ||
|
798 |
+
getComputedStyle(elem).visibility == "hidden" ||
|
799 |
+
getComputedStyle(elem).width == "0" ||
|
800 |
+
getComputedStyle(elem).heigth == "0" ||
|
801 |
+
getComputedStyle(elem).opacity == "0" ||
|
802 |
+
elem.getAttribute("type") == "hidden" ||
|
803 |
+
elem.getAttribute("type") == "submit"
|
804 |
+
){
|
805 |
+
elem_count--;
|
806 |
+
}else{
|
807 |
+
apbct_vf.apbct_visible_fields += elem.getAttribute("name") + (j+1 == form.elements.length ? "" : " ");
|
808 |
+
apbct_vf[elem.getAttribute("name")] = elem.value;
|
809 |
+
}
|
810 |
+
}
|
811 |
+
ctSetCookieSec("apbct_visible_fields", JSON.stringify(apbct_vf));
|
812 |
+
ctSetCookieSec("apbct_visible_fields_count", elem_count);
|
813 |
+
}
|
814 |
+
}
|
815 |
}
|
816 |
+
apbct_attach_event_handler(window, "DOMContentLoaded", apbct_ready);
|
817 |
</script>';
|
818 |
|
819 |
if($return_string)
|
1979 |
}
|
1980 |
|
1981 |
$html .= ct_add_hidden_fields(true, $ct_checkjs_cf7, true);
|
1982 |
+
$html .= ct_add_mouse_tracking(false);
|
1983 |
ct_setup_page_timer();
|
1984 |
|
1985 |
return $html;
|
2061 |
'sender_nickname' => $sender_nickname,
|
2062 |
'post_info' => $post_info,
|
2063 |
'checkjs' => $checkjs
|
2064 |
+
), true, true);
|
2065 |
$ct = $ct_base_call_result['ct'];
|
2066 |
$ct_result = $ct_base_call_result['ct_result'];
|
2067 |
|
2509 |
if (isset($_COOKIE[LOGGED_IN_COOKIE]) && $ct_options['protect_logged_in'] != 1)
|
2510 |
return null;
|
2511 |
|
2512 |
+
$_POST=ct_filter_array($_POST);
|
2513 |
+
|
2514 |
+
$checkjs = js_test('ct_checkjs', $_COOKIE, true);
|
2515 |
+
|
2516 |
+
$post_info['comment_type'] = 'feedback_general_contact_form';
|
2517 |
+
|
2518 |
// Skip the test if it's WooCommerce and the checkout test unset
|
2519 |
if(
|
2520 |
(
|
2525 |
$ct_options['wc_checkout_test'] == 0
|
2526 |
){
|
2527 |
return null;
|
2528 |
+
}else{
|
2529 |
+
$post_info['comment_type'] = 'order';
|
2530 |
}
|
2531 |
|
|
|
|
|
|
|
|
|
|
|
2532 |
$post_info = json_encode($post_info);
|
2533 |
if ($post_info === false) {
|
2534 |
$post_info = '';
|
inc/sfw_die_page.html
CHANGED
@@ -29,7 +29,7 @@
|
|
29 |
}
|
30 |
</style>
|
31 |
<script>
|
32 |
-
var reload_timeout =
|
33 |
function set_spamFireWallCookie(cookie_name, cookie_value) {
|
34 |
document.cookie = cookie_name + '=' + escape(cookie_value) + '; path=/;{COOKIE_DOMAIN}';
|
35 |
return null;
|
@@ -64,13 +64,10 @@ function get_current_url() {
|
|
64 |
setTimeout(function(){
|
65 |
set_spamFireWallCookie('{COOKIE_PREFIX}ct_sfw_pass_key','{SFW_COOKIE}');
|
66 |
set_spamFireWallCookie('{COOKIE_PREFIX}ct_sfw_passed','1');
|
67 |
-
},
|
68 |
setTimeout(function(){
|
69 |
var ct_addition = '';
|
70 |
-
|
71 |
-
ct_addition = '?sfw=pass';
|
72 |
-
else
|
73 |
-
ct_addition = '&sfw=pass';
|
74 |
window.location.href=window.location.href + ct_addition;
|
75 |
}, reload_timeout);
|
76 |
</script>
|
29 |
}
|
30 |
</style>
|
31 |
<script>
|
32 |
+
var reload_timeout = 1000;
|
33 |
function set_spamFireWallCookie(cookie_name, cookie_value) {
|
34 |
document.cookie = cookie_name + '=' + escape(cookie_value) + '; path=/;{COOKIE_DOMAIN}';
|
35 |
return null;
|
64 |
setTimeout(function(){
|
65 |
set_spamFireWallCookie('{COOKIE_PREFIX}ct_sfw_pass_key','{SFW_COOKIE}');
|
66 |
set_spamFireWallCookie('{COOKIE_PREFIX}ct_sfw_passed','1');
|
67 |
+
}, 50);
|
68 |
setTimeout(function(){
|
69 |
var ct_addition = '';
|
70 |
+
ct_addition = window.location.search === '' ? '?sfw=pass' : '&sfw=pass';
|
|
|
|
|
|
|
71 |
window.location.href=window.location.href + ct_addition;
|
72 |
}, reload_timeout);
|
73 |
</script>
|
lib/CleantalkSFW.php
CHANGED
@@ -104,7 +104,7 @@ class CleantalkSFW
|
|
104 |
$this->unversal_query($query);
|
105 |
$this->unversal_fetch();
|
106 |
|
107 |
-
$curr_ip = long2ip($this->ip_array[$i]);
|
108 |
|
109 |
if($this->db_result_data['cnt']){
|
110 |
$this->result = true;
|
@@ -236,7 +236,7 @@ class CleantalkSFW
|
|
236 |
$sfw_die_page = str_replace('{SFW_DIE_NOTICE_IP}', __('SpamFireWall is activated for your IP ', 'cleantalk'), $sfw_die_page);
|
237 |
$sfw_die_page = str_replace('{SFW_DIE_MAKE_SURE_JS_ENABLED}', __('To continue working with web site, please make sure that you have enabled JavaScript.', 'cleantalk'), $sfw_die_page);
|
238 |
$sfw_die_page = str_replace('{SFW_DIE_CLICK_TO_PASS}', __('Please click bellow to pass protection,', 'cleantalk'), $sfw_die_page);
|
239 |
-
$sfw_die_page = str_replace('{SFW_DIE_YOU_WILL_BE_REDIRECTED}', __('Or you will be automatically redirected to the requested page after
|
240 |
$sfw_die_page = str_replace('{CLEANTALK_TITLE}', __('Antispam by CleanTalk', 'cleantalk'), $sfw_die_page);
|
241 |
|
242 |
// Service info
|
104 |
$this->unversal_query($query);
|
105 |
$this->unversal_fetch();
|
106 |
|
107 |
+
$curr_ip = long2ip(intval($this->ip_array[$i]));
|
108 |
|
109 |
if($this->db_result_data['cnt']){
|
110 |
$this->result = true;
|
236 |
$sfw_die_page = str_replace('{SFW_DIE_NOTICE_IP}', __('SpamFireWall is activated for your IP ', 'cleantalk'), $sfw_die_page);
|
237 |
$sfw_die_page = str_replace('{SFW_DIE_MAKE_SURE_JS_ENABLED}', __('To continue working with web site, please make sure that you have enabled JavaScript.', 'cleantalk'), $sfw_die_page);
|
238 |
$sfw_die_page = str_replace('{SFW_DIE_CLICK_TO_PASS}', __('Please click bellow to pass protection,', 'cleantalk'), $sfw_die_page);
|
239 |
+
$sfw_die_page = str_replace('{SFW_DIE_YOU_WILL_BE_REDIRECTED}', sprintf(__('Or you will be automatically redirected to the requested page after %d seconds.', 'cleantalk'), 1), $sfw_die_page);
|
240 |
$sfw_die_page = str_replace('{CLEANTALK_TITLE}', __('Antispam by CleanTalk', 'cleantalk'), $sfw_die_page);
|
241 |
|
242 |
// Service info
|
readme.txt
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
=== Spam protection FireWall, AntiSpam by CleanTalk ===
|
2 |
Contributors: znaeff, shagimuratov, sartemd174
|
3 |
-
Tags: antispam, protection, contact form
|
4 |
Requires at least: 3.0
|
5 |
-
|
6 |
-
|
|
|
7 |
License: GPLv2
|
8 |
|
9 |
Spam protection, antispam, all-in-one, premium plugin. No spam comments & users, no spam contact form & WooCommerce spam. Forget spam.
|
@@ -12,9 +13,9 @@ Spam protection, antispam, all-in-one, premium plugin. No spam comments & users,
|
|
12 |
|
13 |
**Supports: Contact Form 7, Ninja Forms, Gravity Forms, MailChimp, Formidable forms, WooCommerce, JetPack comments and contact form, BuddyPress, bbPress, Fast Secure Contact form, S2Member, MailPoet, any WordPress registrations & contact forms and themes. Just setup and forget the spam!**
|
14 |
|
15 |
-
No CAPTCHA, no questions, no animal counting, no puzzles, no math and no spam bots. Universal
|
16 |
|
17 |
-
=
|
18 |
1. Stops spam comments.
|
19 |
1. Stops spam registrations.
|
20 |
1. Stops spam contact emails.
|
@@ -28,20 +29,19 @@ No CAPTCHA, no questions, no animal counting, no puzzles, no math and no spam bo
|
|
28 |
1. Compatible with mobile users and devices.
|
29 |
|
30 |
= Free trial then $8 per year =
|
31 |
-
CleanTalk is a free anti spam plugin which work with the premium Cloud
|
32 |
|
33 |
= Public reviews =
|
34 |
-
>With CleanTalk installed you can rest assured that you will no longer have to fuss with annoying spam. You can now focus your time on developing and improving your web site, your blog content, and you business without being distracted by these useless comments.
|
35 |
-
> *Dr. Erica Goodstone. <a href="https://www.poweraffiliateclub.com/clear-your-blog-of-spam-comments/" target="_blank">www.poweraffiliateclub.com</a>*
|
36 |
-
|
37 |
> Using CleanTalk on WPLift was a great test as we receive huge amounts of spam.
|
38 |
> *Oliver Dale, <a href="http://wplift.com/wordpress-anti-spam-plugin" target="_blank">WPLift.com</a>.*
|
39 |
|
40 |
>I know you have heard of a number of anti-spam plugins. But you must know, the cloud-based ones are the best regarding detection rate. They compare all the content in forms with their own algorithm to find out the legibility.
|
41 |
>*<a href="https://www.techwibe.com/cleantalk-wordpress-plugin-review/" target="_blank">www.techwibe.com</a>*
|
42 |
|
|
|
|
|
43 |
|
44 |
-
=
|
45 |
Native spam protection for WordPress, JetPack comments and any other comment plugins. The plugin moves spam comments to SPAM folder or you can set the option to ban spam comments silently. You can also enable the option in the plugin settings to auto-delete comments from SPAM folder.
|
46 |
|
47 |
= Spam bot registrations filter =
|
@@ -104,6 +104,16 @@ blocks the spam attacks from IP addresses which are not included in the SFW base
|
|
104 |
= Low false/positive rate =
|
105 |
This plugin uses multiple anti-spam tests to filter spam bots having as low false/positive rate as possible. Multiple anti-spam tests help to avoid false/positive blocks of the real website visitors even if one of the tests failed.
|
106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
= How CleanTalk improves SEO for your website? =
|
108 |
So, you already know that the speed of the site has a direct impact on SEO.
|
109 |
|
@@ -111,9 +121,9 @@ So, you already know that the speed of the site has a direct impact on SEO.
|
|
111 |
|
112 |
There are different ways of improving your site's loading performance. One important parameter for site performance is to install well-developed plugins from a reputable source.
|
113 |
|
114 |
-
Among anti-spam plugins CleanTalk
|
115 |
large plugin functionality, the developers have optimized the performance of
|
116 |
-
the plugin so that
|
117 |
|
118 |
https://s.w.org/plugins/cleantalk-spam-protect/screenshot-5.png?r=1288723
|
119 |
|
@@ -240,7 +250,9 @@ WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enab
|
|
240 |
|
241 |
== Installation ==
|
242 |
|
243 |
-
|
|
|
|
|
244 |
|
245 |
2. Get Access key <a href="https://cleantalk.org/register?platform=wordpress" target="_blank">https://cleantalk.org/register</a>
|
246 |
|
@@ -260,6 +272,7 @@ In WordPress multisite version you can switch the plugin to use Global Access ke
|
|
260 |
Now, all subsites will have this access key.
|
261 |
|
262 |
= Manage and control spam protection =
|
|
|
263 |
Go to <a href="https://cleantalk.org/my" target="_blank">Dashboard</a> at the cleantalk.org or use <a href="https://play.google.com/store/apps/details?id=org.cleantalk.app">Android</a>, <a href="https://itunes.apple.com/us/app/cleantalk/id825479913?mt=8">iPhone</a> anti-spam app to manage and control spam protection.
|
264 |
|
265 |
|
@@ -521,6 +534,11 @@ We develop plugin to do it as optimized as possible, CleanTalk doesn't downgrade
|
|
521 |
1. The plugin deletes/removes the existing spam comments and users accounts.
|
522 |
|
523 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
524 |
= 5.79 October 26 2017 =
|
525 |
* Spam protection improved.
|
526 |
* Fixed issue with existing spam comments check.
|
@@ -1470,7 +1488,12 @@ We develop plugin to do it as optimized as possible, CleanTalk doesn't downgrade
|
|
1470 |
* First version
|
1471 |
|
1472 |
== Upgrade Notice ==
|
1473 |
-
= 5.
|
|
|
|
|
|
|
|
|
|
|
1474 |
* Spam protection improved.
|
1475 |
* Fixed issue with existing spam comments check.
|
1476 |
* Added posibility to exclude IP from check.
|
1 |
=== Spam protection FireWall, AntiSpam by CleanTalk ===
|
2 |
Contributors: znaeff, shagimuratov, sartemd174
|
3 |
+
Tags: spam, antispam, protection, comments, contact form
|
4 |
Requires at least: 3.0
|
5 |
+
Requires PHP: 5.2.3
|
6 |
+
Tested up to: 4.9
|
7 |
+
Stable tag: 5.80
|
8 |
License: GPLv2
|
9 |
|
10 |
Spam protection, antispam, all-in-one, premium plugin. No spam comments & users, no spam contact form & WooCommerce spam. Forget spam.
|
13 |
|
14 |
**Supports: Contact Form 7, Ninja Forms, Gravity Forms, MailChimp, Formidable forms, WooCommerce, JetPack comments and contact form, BuddyPress, bbPress, Fast Secure Contact form, S2Member, MailPoet, any WordPress registrations & contact forms and themes. Just setup and forget the spam!**
|
15 |
|
16 |
+
No CAPTCHA, no questions, no animal counting, no puzzles, no math and no spam bots. Universal AntiSpam plugin.
|
17 |
|
18 |
+
= AntiSpam features =
|
19 |
1. Stops spam comments.
|
20 |
1. Stops spam registrations.
|
21 |
1. Stops spam contact emails.
|
29 |
1. Compatible with mobile users and devices.
|
30 |
|
31 |
= Free trial then $8 per year =
|
32 |
+
CleanTalk is a free anti spam plugin which work with the premium Cloud AntiSpam service cleantalk.org. This plugin as a service https://en.wikipedia.org/wiki/Software_as_a_service.
|
33 |
|
34 |
= Public reviews =
|
|
|
|
|
|
|
35 |
> Using CleanTalk on WPLift was a great test as we receive huge amounts of spam.
|
36 |
> *Oliver Dale, <a href="http://wplift.com/wordpress-anti-spam-plugin" target="_blank">WPLift.com</a>.*
|
37 |
|
38 |
>I know you have heard of a number of anti-spam plugins. But you must know, the cloud-based ones are the best regarding detection rate. They compare all the content in forms with their own algorithm to find out the legibility.
|
39 |
>*<a href="https://www.techwibe.com/cleantalk-wordpress-plugin-review/" target="_blank">www.techwibe.com</a>*
|
40 |
|
41 |
+
> The key selling point of CleanTalk for me is not simply its effectiveness. It’s the fact that CleanTalk works in the background. It does not make users jump through hoops in order to submit a comment or complete a form.
|
42 |
+
> <a href="https://www.kevinmuldoon.com/cleantalk-anti-spam-service/">www.kevinmuldoon.com</a>
|
43 |
|
44 |
+
= AntiSpam protection for comments =
|
45 |
Native spam protection for WordPress, JetPack comments and any other comment plugins. The plugin moves spam comments to SPAM folder or you can set the option to ban spam comments silently. You can also enable the option in the plugin settings to auto-delete comments from SPAM folder.
|
46 |
|
47 |
= Spam bot registrations filter =
|
104 |
= Low false/positive rate =
|
105 |
This plugin uses multiple anti-spam tests to filter spam bots having as low false/positive rate as possible. Multiple anti-spam tests help to avoid false/positive blocks of the real website visitors even if one of the tests failed.
|
106 |
|
107 |
+
= How effective is CleanTalk? =
|
108 |
+
Accurately blocking spam is not an easy thing to do, but CleanTalk has a very low proven False/Positive rate. Here is actual statistics on false positives for all customers.
|
109 |
+
|
110 |
+
* Registrations - 0.007%
|
111 |
+
* Comments - 0.001%
|
112 |
+
* Contact forms - 0.001%
|
113 |
+
* Orders (WooCommerce) - 0.008%
|
114 |
+
|
115 |
+
The statistic was calculated on November 10 2017 for 1 million requests.
|
116 |
+
|
117 |
= How CleanTalk improves SEO for your website? =
|
118 |
So, you already know that the speed of the site has a direct impact on SEO.
|
119 |
|
121 |
|
122 |
There are different ways of improving your site's loading performance. One important parameter for site performance is to install well-developed plugins from a reputable source.
|
123 |
|
124 |
+
Among anti-spam plugins CleanTalk AntiSpam is one of the fastest. Despite the
|
125 |
large plugin functionality, the developers have optimized the performance of
|
126 |
+
the plugin so that AntiSpam by CleanTalk is faster than most analogs. This contributes to the cloud service architecture, as all calculations take place in the cloud, not on the server, the server receives the finished result for further action.
|
127 |
|
128 |
https://s.w.org/plugins/cleantalk-spam-protect/screenshot-5.png?r=1288723
|
129 |
|
250 |
|
251 |
== Installation ==
|
252 |
|
253 |
+
= Installation instructions =
|
254 |
+
|
255 |
+
1. Download, install and activate 'Anti-spam by CleanTalk'.
|
256 |
|
257 |
2. Get Access key <a href="https://cleantalk.org/register?platform=wordpress" target="_blank">https://cleantalk.org/register</a>
|
258 |
|
272 |
Now, all subsites will have this access key.
|
273 |
|
274 |
= Manage and control spam protection =
|
275 |
+
|
276 |
Go to <a href="https://cleantalk.org/my" target="_blank">Dashboard</a> at the cleantalk.org or use <a href="https://play.google.com/store/apps/details?id=org.cleantalk.app">Android</a>, <a href="https://itunes.apple.com/us/app/cleantalk/id825479913?mt=8">iPhone</a> anti-spam app to manage and control spam protection.
|
277 |
|
278 |
|
534 |
1. The plugin deletes/removes the existing spam comments and users accounts.
|
535 |
|
536 |
== Changelog ==
|
537 |
+
= 5.80 November 3 2017 =
|
538 |
+
* Spam protection improved.
|
539 |
+
* Improved filtration quality for WooCommerce checkout.
|
540 |
+
* Minor fixes for SpamFireWall.
|
541 |
+
|
542 |
= 5.79 October 26 2017 =
|
543 |
* Spam protection improved.
|
544 |
* Fixed issue with existing spam comments check.
|
1488 |
* First version
|
1489 |
|
1490 |
== Upgrade Notice ==
|
1491 |
+
= 5.80 November 3 2017 =
|
1492 |
+
* Spam protection improved.
|
1493 |
+
* Improved filtration quality for WooCommerce checkout.
|
1494 |
+
* Minor fixes for SpamFireWall.
|
1495 |
+
|
1496 |
+
= 5.79 October 26 2017 =
|
1497 |
* Spam protection improved.
|
1498 |
* Fixed issue with existing spam comments check.
|
1499 |
* Added posibility to exclude IP from check.
|