Version Description
2015-10-27 = * Optimized performance * Fixed bugs in custom contact forms spam checking
Download this release
Release Info
Developer | shagimuratov |
Plugin | Spam protection, AntiSpam, FireWall by CleanTalk |
Version | 5.29 |
Comparing to | |
See all releases |
Code changes from version 5.28.7 to 5.29
- cleantalk.php +6 -15
- inc/cleantalk-admin.php +18 -11
- inc/cleantalk-common.php +10 -11
- inc/cleantalk-public.php +87 -2
- inc/cleantalk-sfw.class.php +1 -1
- readme.txt +13 -5
cleantalk.php
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
Plugin Name: Anti-Spam by CleanTalk
|
4 |
Plugin URI: http://cleantalk.org
|
5 |
Description: Max power, all-in-one, captcha less, 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 |
*/
|
10 |
-
$cleantalk_plugin_version='5.
|
11 |
$cleantalk_executed=false;
|
12 |
|
13 |
if(defined('CLEANTALK_AJAX_USE_BUFFER'))
|
@@ -31,12 +31,6 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
31 |
define('CLEANTALK_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
32 |
global $ct_options, $ct_data;
|
33 |
|
34 |
-
if(@sizeof($_POST)==0 && @sizeof($_GET)==3 && isset($_GET['your_name']) && isset($_GET['email']) && isset($_GET['message']))
|
35 |
-
{
|
36 |
-
$_POST=$_GET;
|
37 |
-
}
|
38 |
-
|
39 |
-
|
40 |
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-common.php');
|
41 |
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-widget.php');
|
42 |
$ct_options=ct_get_options();
|
@@ -96,7 +90,7 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
96 |
register_deactivation_hook( __FILE__, 'ct_deactivation' );
|
97 |
|
98 |
// After plugin loaded - to load locale as described in manual
|
99 |
-
add_action( '
|
100 |
|
101 |
if(isset($ct_options['use_ajax']))
|
102 |
{
|
@@ -139,7 +133,7 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
139 |
}
|
140 |
|
141 |
|
142 |
-
if (is_admin()
|
143 |
{
|
144 |
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-admin.php');
|
145 |
if (!(defined( 'DOING_AJAX' ) && DOING_AJAX)) {
|
@@ -191,9 +185,6 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
|
|
191 |
// Login form - for notifications only
|
192 |
add_filter('login_message', 'ct_login_message');
|
193 |
}
|
194 |
-
|
195 |
-
add_action('wp_logout', 'ct_end_session');
|
196 |
-
add_action('wp_login', 'ct_end_session');
|
197 |
}
|
198 |
|
199 |
/**
|
@@ -368,7 +359,7 @@ INDEX ( `network` , `mask` )
|
|
368 |
{
|
369 |
$result=$result['data'];
|
370 |
$query="INSERT INTO `".$wpdb->base_prefix."cleantalk_sfw` VALUES ";
|
371 |
-
if(sizeof($result)>
|
372 |
{
|
373 |
$wpdb->query("TRUNCATE TABLE `".$wpdb->base_prefix."cleantalk_sfw`;");
|
374 |
for($i=0;$i<sizeof($result);$i++)
|
@@ -425,4 +416,4 @@ function ct_send_sfw_log()
|
|
425 |
$sfw = new CleanTalkSFW();
|
426 |
$sfw->send_logs();
|
427 |
}
|
428 |
-
?>
|
3 |
Plugin Name: Anti-Spam by CleanTalk
|
4 |
Plugin URI: http://cleantalk.org
|
5 |
Description: Max power, all-in-one, captcha less, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms.
|
6 |
+
Version: 5.29
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: http://cleantalk.org
|
9 |
*/
|
10 |
+
$cleantalk_plugin_version='5.29';
|
11 |
$cleantalk_executed=false;
|
12 |
|
13 |
if(defined('CLEANTALK_AJAX_USE_BUFFER'))
|
31 |
define('CLEANTALK_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
32 |
global $ct_options, $ct_data;
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-common.php');
|
35 |
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-widget.php');
|
36 |
$ct_options=ct_get_options();
|
90 |
register_deactivation_hook( __FILE__, 'ct_deactivation' );
|
91 |
|
92 |
// After plugin loaded - to load locale as described in manual
|
93 |
+
add_action( 'admin_init', 'ct_plugin_loaded' );
|
94 |
|
95 |
if(isset($ct_options['use_ajax']))
|
96 |
{
|
133 |
}
|
134 |
|
135 |
|
136 |
+
if (is_admin())
|
137 |
{
|
138 |
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-admin.php');
|
139 |
if (!(defined( 'DOING_AJAX' ) && DOING_AJAX)) {
|
185 |
// Login form - for notifications only
|
186 |
add_filter('login_message', 'ct_login_message');
|
187 |
}
|
|
|
|
|
|
|
188 |
}
|
189 |
|
190 |
/**
|
359 |
{
|
360 |
$result=$result['data'];
|
361 |
$query="INSERT INTO `".$wpdb->base_prefix."cleantalk_sfw` VALUES ";
|
362 |
+
if(sizeof($result)>200)
|
363 |
{
|
364 |
$wpdb->query("TRUNCATE TABLE `".$wpdb->base_prefix."cleantalk_sfw`;");
|
365 |
for($i=0;$i<sizeof($result);$i++)
|
416 |
$sfw = new CleanTalkSFW();
|
417 |
$sfw->send_logs();
|
418 |
}
|
419 |
+
?>
|
inc/cleantalk-admin.php
CHANGED
@@ -107,25 +107,25 @@ function ct_admin_init() {
|
|
107 |
{
|
108 |
$ct_data['current_version']=$cleantalk_plugin_version;
|
109 |
update_option('cleantalk_data', $ct_data);
|
110 |
-
|
111 |
'message' => 'CleanTalk setup test',
|
112 |
'example' => null,
|
113 |
'sender_email' => 'good@cleantalk.org',
|
114 |
'sender_nickname' => 'CleanTalk',
|
115 |
'post_info' => '',
|
116 |
'checkjs' => 1
|
117 |
-
))
|
118 |
}
|
119 |
if(isset($_POST['option_page'])&&$_POST['option_page']=='cleantalk_settings')
|
120 |
{
|
121 |
-
|
122 |
'message' => 'CleanTalk setup test',
|
123 |
'example' => null,
|
124 |
'sender_email' => 'good@cleantalk.org',
|
125 |
'sender_nickname' => 'CleanTalk',
|
126 |
'post_info' => '',
|
127 |
'checkjs' => 1
|
128 |
-
))
|
129 |
}
|
130 |
|
131 |
if(@isset($_POST['cleantalk_settings']['spam_firewall']) && $_POST['cleantalk_settings']['spam_firewall']==1 || isset($ct_options['spam_firewall']) && intval($ct_options['spam_firewall'])==1)
|
@@ -334,7 +334,10 @@ function ct_admin_init() {
|
|
334 |
add_settings_section('cleantalk_settings_banner', "<hr></h3>", '', 'cleantalk');
|
335 |
add_settings_section('cleantalk_settings_anti_spam', "<a href='#' style='text-decoration:underline;font-size:10pt;font-weight:400;'>".__('Advanced settings', 'cleantalk')."</a>", 'ct_section_settings_anti_spam', 'cleantalk');
|
336 |
|
337 |
-
|
|
|
|
|
|
|
338 |
add_settings_field('cleantalk_remove_old_spam', __('Automatically delete spam comments', 'cleantalk'), 'ct_input_remove_old_spam', 'cleantalk', 'cleantalk_settings_anti_spam');
|
339 |
|
340 |
add_settings_field('cleantalk_registrations_test', __('Registration forms', 'cleantalk'), 'ct_input_registrations_test', 'cleantalk', 'cleantalk_settings_anti_spam');
|
@@ -534,11 +537,11 @@ function ct_input_apikey() {
|
|
534 |
echo "<input id='cleantalk_apikey' name='cleantalk_settings[apikey]' size='20' type='text' value='$value' style=\"font-size: 14pt;\"/>";
|
535 |
if (ct_valid_key($value) === false) {
|
536 |
echo "<script>var cleantalk_good_key=false;</script>";
|
537 |
-
echo "<a target='__blank' style='
|
538 |
if (function_exists('curl_init') && function_exists('json_decode')) {
|
539 |
-
echo '<br /><br /><input name="get_apikey_auto" type="submit" value="' . __('Get access key automatically', 'cleantalk') . '" />';
|
540 |
-
admin_addDescriptionsFields(sprintf(__('Admin e-mail (%s) will be used for registration', 'cleantalk'), get_option('admin_email')));
|
541 |
-
admin_addDescriptionsFields(sprintf('<a target="__blank" style="color:#BBB;" href="https://cleantalk.org/publicoffer">%s</a>', __('License agreement', 'cleantalk')));
|
542 |
}
|
543 |
} else {
|
544 |
echo "<script>var cleantalk_good_key=true;</script>";
|
@@ -854,12 +857,16 @@ function ct_settings_validate($input) {
|
|
854 |
function ct_settings_page() {
|
855 |
?>
|
856 |
<style type="text/css">
|
857 |
-
input[type=submit] {padding: 10px; background: #3399FF; color: #fff; border:0 none;
|
858 |
cursor:pointer;
|
859 |
-webkit-border-radius: 5px;
|
860 |
border-radius: 5px;
|
861 |
font-size: 12pt;
|
862 |
}
|
|
|
|
|
|
|
|
|
863 |
</style>
|
864 |
|
865 |
<div>
|
@@ -913,7 +920,7 @@ function cleantalk_admin_notice_message(){
|
|
913 |
|
914 |
if ($show_notice && $show_ct_notice_autokey && $value==1) {
|
915 |
echo '<div class="error"><h3>' . sprintf(__("Unable to get Access key automatically: %s", 'cleantalk'), $ct_notice_autokey_value);
|
916 |
-
echo " <a target='__blank' style='margin-left: 10px' href='https://cleantalk.org/register?platform=wordpress&email=".urlencode(get_option('admin_email'))."&website=".urlencode(parse_url(get_option('siteurl'),PHP_URL_HOST))."'>".__('
|
917 |
}
|
918 |
|
919 |
if ($show_notice && ct_valid_key($ct_options['apikey']) === false && $value==1) {
|
107 |
{
|
108 |
$ct_data['current_version']=$cleantalk_plugin_version;
|
109 |
update_option('cleantalk_data', $ct_data);
|
110 |
+
$ct_base_call_result = ct_base_call(array(
|
111 |
'message' => 'CleanTalk setup test',
|
112 |
'example' => null,
|
113 |
'sender_email' => 'good@cleantalk.org',
|
114 |
'sender_nickname' => 'CleanTalk',
|
115 |
'post_info' => '',
|
116 |
'checkjs' => 1
|
117 |
+
));
|
118 |
}
|
119 |
if(isset($_POST['option_page'])&&$_POST['option_page']=='cleantalk_settings')
|
120 |
{
|
121 |
+
$ct_base_call_result = ct_base_call(array(
|
122 |
'message' => 'CleanTalk setup test',
|
123 |
'example' => null,
|
124 |
'sender_email' => 'good@cleantalk.org',
|
125 |
'sender_nickname' => 'CleanTalk',
|
126 |
'post_info' => '',
|
127 |
'checkjs' => 1
|
128 |
+
));
|
129 |
}
|
130 |
|
131 |
if(@isset($_POST['cleantalk_settings']['spam_firewall']) && $_POST['cleantalk_settings']['spam_firewall']==1 || isset($ct_options['spam_firewall']) && intval($ct_options['spam_firewall'])==1)
|
334 |
add_settings_section('cleantalk_settings_banner', "<hr></h3>", '', 'cleantalk');
|
335 |
add_settings_section('cleantalk_settings_anti_spam', "<a href='#' style='text-decoration:underline;font-size:10pt;font-weight:400;'>".__('Advanced settings', 'cleantalk')."</a>", 'ct_section_settings_anti_spam', 'cleantalk');
|
336 |
|
337 |
+
//if((is_network_admin() || (!defined('WP_ALLOW_MULTISITE')||defined('WP_ALLOW_MULTISITE')&&WP_ALLOW_MULTISITE==false) && is_admin()))
|
338 |
+
//{
|
339 |
+
add_settings_field('cleantalk_apikey', __('Access key', 'cleantalk'), 'ct_input_apikey', 'cleantalk', 'cleantalk_settings_main');
|
340 |
+
//}
|
341 |
add_settings_field('cleantalk_remove_old_spam', __('Automatically delete spam comments', 'cleantalk'), 'ct_input_remove_old_spam', 'cleantalk', 'cleantalk_settings_anti_spam');
|
342 |
|
343 |
add_settings_field('cleantalk_registrations_test', __('Registration forms', 'cleantalk'), 'ct_input_registrations_test', 'cleantalk', 'cleantalk_settings_anti_spam');
|
537 |
echo "<input id='cleantalk_apikey' name='cleantalk_settings[apikey]' size='20' type='text' value='$value' style=\"font-size: 14pt;\"/>";
|
538 |
if (ct_valid_key($value) === false) {
|
539 |
echo "<script>var cleantalk_good_key=false;</script>";
|
540 |
+
echo "<br /><br /><a target='__blank' class='cleantalk_manual_link' style='text-decoration:none;' href='https://cleantalk.org/register?platform=wordpress&email=".urlencode(get_option('admin_email'))."&website=".urlencode(parse_url(get_option('siteurl'),PHP_URL_HOST))."'>".__('Get the Access key', 'cleantalk')."</a>";
|
541 |
if (function_exists('curl_init') && function_exists('json_decode')) {
|
542 |
+
//echo '<br /><br /><input name="get_apikey_auto" type="submit" value="' . __('Get access key automatically', 'cleantalk') . '" />';
|
543 |
+
//admin_addDescriptionsFields(sprintf(__('Admin e-mail (%s) will be used for registration', 'cleantalk'), get_option('admin_email')));
|
544 |
+
//admin_addDescriptionsFields(sprintf('<a target="__blank" style="color:#BBB;" href="https://cleantalk.org/publicoffer">%s</a>', __('License agreement', 'cleantalk')));
|
545 |
}
|
546 |
} else {
|
547 |
echo "<script>var cleantalk_good_key=true;</script>";
|
857 |
function ct_settings_page() {
|
858 |
?>
|
859 |
<style type="text/css">
|
860 |
+
input[type=submit], .cleantalk_manual_link {padding: 10px; background: #3399FF; color: #fff; border:0 none;
|
861 |
cursor:pointer;
|
862 |
-webkit-border-radius: 5px;
|
863 |
border-radius: 5px;
|
864 |
font-size: 12pt;
|
865 |
}
|
866 |
+
.cleantalk_manual_link:hover
|
867 |
+
{
|
868 |
+
color:white;
|
869 |
+
}
|
870 |
</style>
|
871 |
|
872 |
<div>
|
920 |
|
921 |
if ($show_notice && $show_ct_notice_autokey && $value==1) {
|
922 |
echo '<div class="error"><h3>' . sprintf(__("Unable to get Access key automatically: %s", 'cleantalk'), $ct_notice_autokey_value);
|
923 |
+
echo " <a target='__blank' style='margin-left: 10px' href='https://cleantalk.org/register?platform=wordpress&email=".urlencode(get_option('admin_email'))."&website=".urlencode(parse_url(get_option('siteurl'),PHP_URL_HOST))."'>".__('Get the Access key', 'cleantalk').'</a></h3></div>';
|
924 |
}
|
925 |
|
926 |
if ($show_notice && ct_valid_key($ct_options['apikey']) === false && $value==1) {
|
inc/cleantalk-common.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
$ct_agent_version = 'wordpress-
|
4 |
$ct_plugin_name = 'Anti-spam by CleanTalk';
|
5 |
$ct_checkjs_frm = 'ct_checkjs_frm';
|
6 |
$ct_checkjs_register_form = 'ct_checkjs_register_form';
|
@@ -117,15 +117,6 @@ function ct_init_session() {
|
|
117 |
return null;
|
118 |
}
|
119 |
|
120 |
-
/**
|
121 |
-
* Session end
|
122 |
-
* @return null;
|
123 |
-
*/
|
124 |
-
function ct_end_session() {
|
125 |
-
session_destroy();
|
126 |
-
return null;
|
127 |
-
}
|
128 |
-
|
129 |
/**
|
130 |
* Inner function - Common part of request sending
|
131 |
* @param array Array of parameters:
|
@@ -775,4 +766,12 @@ function ct_filter_array(&$array)
|
|
775 |
return $array;
|
776 |
}
|
777 |
}
|
778 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
|
3 |
+
$ct_agent_version = 'wordpress-529';
|
4 |
$ct_plugin_name = 'Anti-spam by CleanTalk';
|
5 |
$ct_checkjs_frm = 'ct_checkjs_frm';
|
6 |
$ct_checkjs_register_form = 'ct_checkjs_register_form';
|
117 |
return null;
|
118 |
}
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
/**
|
121 |
* Inner function - Common part of request sending
|
122 |
* @param array Array of parameters:
|
766 |
return $array;
|
767 |
}
|
768 |
}
|
769 |
+
|
770 |
+
function cleantalk_debug($key,$value)
|
771 |
+
{
|
772 |
+
if(isset($_COOKIE) && isset($_COOKIE['cleantalk_debug']))
|
773 |
+
{
|
774 |
+
@header($key.": ".$value);
|
775 |
+
}
|
776 |
+
}
|
777 |
+
?>
|
inc/cleantalk-public.php
CHANGED
@@ -31,7 +31,7 @@ function ct_init() {
|
|
31 |
die();
|
32 |
}
|
33 |
|
34 |
-
if(isset($ct_options['general_postdata_test']))
|
35 |
{
|
36 |
$ct_general_postdata_test = @intval($ct_options['general_postdata_test']);
|
37 |
//hook for Anonymous Post
|
@@ -1705,8 +1705,39 @@ function ct_contact_form_validate () {
|
|
1705 |
{
|
1706 |
$ct_cnt=0;
|
1707 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1708 |
|
|
|
|
|
|
|
1709 |
$_POST=ct_filter_array($_POST);
|
|
|
|
|
1710 |
|
1711 |
$checkjs = js_test('ct_checkjs', $_COOKIE, true);
|
1712 |
|
@@ -1723,6 +1754,22 @@ function ct_contact_form_validate () {
|
|
1723 |
$contact_form = true;
|
1724 |
|
1725 |
@ct_get_fields_any($sender_email, $message, $sender_nickname, $subject, $contact_form, $_POST);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1726 |
|
1727 |
// Skip submission if no data found
|
1728 |
if ($sender_email===''|| !$contact_form) {
|
@@ -1736,6 +1783,9 @@ function ct_contact_form_validate () {
|
|
1736 |
unset($_POST['TellAFriend_Link']);
|
1737 |
}
|
1738 |
|
|
|
|
|
|
|
1739 |
$ct_base_call_result = ct_base_call(array(
|
1740 |
'message' => $subject . "\n\n" . $message,
|
1741 |
'example' => null,
|
@@ -1745,6 +1795,8 @@ function ct_contact_form_validate () {
|
|
1745 |
'sender_info' => get_sender_info(),
|
1746 |
'checkjs' => $checkjs
|
1747 |
));
|
|
|
|
|
1748 |
|
1749 |
if(isset($_POST['TellAFriend_Link']))
|
1750 |
{
|
@@ -1755,8 +1807,12 @@ function ct_contact_form_validate () {
|
|
1755 |
$ct_result = $ct_base_call_result['ct_result'];
|
1756 |
|
1757 |
if ($ct_result->allow == 0) {
|
|
|
|
|
1758 |
|
1759 |
if (!(defined( 'DOING_AJAX' ) && DOING_AJAX)) {
|
|
|
|
|
1760 |
global $ct_comment;
|
1761 |
$ct_comment = $ct_result->comment;
|
1762 |
if(isset($_POST['cma-action'])&&$_POST['cma-action']=='add')
|
@@ -1776,10 +1832,14 @@ function ct_contact_form_validate () {
|
|
1776 |
ct_die(null, null);
|
1777 |
}
|
1778 |
} else {
|
|
|
|
|
1779 |
echo $ct_result->comment;
|
1780 |
}
|
1781 |
exit;
|
1782 |
}
|
|
|
|
|
1783 |
|
1784 |
return null;
|
1785 |
}
|
@@ -1809,6 +1869,31 @@ function ct_contact_form_validate_postdata () {
|
|
1809 |
{
|
1810 |
$ct_cnt=0;
|
1811 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1812 |
|
1813 |
$_POST=ct_filter_array($_POST);
|
1814 |
|
@@ -1946,4 +2031,4 @@ function ct_print_form($arr,$k)
|
|
1946 |
}
|
1947 |
}
|
1948 |
|
1949 |
-
?>
|
31 |
die();
|
32 |
}
|
33 |
|
34 |
+
if(isset($ct_options['general_postdata_test']) && $ct_options['general_postdata_test'] == 1)
|
35 |
{
|
36 |
$ct_general_postdata_test = @intval($ct_options['general_postdata_test']);
|
37 |
//hook for Anonymous Post
|
1705 |
{
|
1706 |
$ct_cnt=0;
|
1707 |
}
|
1708 |
+
//@header("CtExclusions: ".$ct_cnt);
|
1709 |
+
cleantalk_debug("CtExclusions", $ct_cnt);
|
1710 |
+
|
1711 |
+
if (@sizeof($_POST)==0 ||
|
1712 |
+
(isset($_POST['signup_username']) && isset($_POST['signup_email']) && isset($_POST['signup_password'])) ||
|
1713 |
+
(isset($pagenow) && $pagenow == 'wp-login.php') || // WordPress log in form
|
1714 |
+
(isset($pagenow) && $pagenow == 'wp-login.php' && isset($_GET['action']) && $_GET['action']=='lostpassword') ||
|
1715 |
+
strpos($_SERVER['REQUEST_URI'],'/checkout/')!==false ||
|
1716 |
+
strpos($_SERVER['REQUEST_URI'],'/wp-admin/')!==false ||
|
1717 |
+
strpos($_SERVER['REQUEST_URI'],'wp-login.php')!==false||
|
1718 |
+
strpos($_SERVER['REQUEST_URI'],'wp-comments-post.php')!==false ||
|
1719 |
+
@strpos($_SERVER['HTTP_REFERER'],'/wp-admin/')!==false ||
|
1720 |
+
strpos($_SERVER['REQUEST_URI'],'/login/')!==false||
|
1721 |
+
isset($_GET['ptype']) && $_GET['ptype']=='login' ||
|
1722 |
+
check_url_exclusions() ||
|
1723 |
+
ct_check_array_keys($_POST) ||
|
1724 |
+
isset($_POST['ct_checkjs_register_form']) ||
|
1725 |
+
(isset($_POST['signup_username']) && isset($_POST['signup_password_confirm']) && isset($_POST['signup_submit']) ) ||
|
1726 |
+
@intval($ct_options['general_contact_forms_test'])==0 ||
|
1727 |
+
isset($_POST['bbp_topic_content']) ||
|
1728 |
+
isset($_POST['bbp_reply_content']) ||
|
1729 |
+
isset($_COOKIE[LOGGED_IN_COOKIE]) ||
|
1730 |
+
isset($_POST['fscf_submitted'])
|
1731 |
+
) {
|
1732 |
+
return null;
|
1733 |
+
}
|
1734 |
|
1735 |
+
//@header("CtConditions: Passed");
|
1736 |
+
cleantalk_debug("CtConditions", "Passed");
|
1737 |
+
|
1738 |
$_POST=ct_filter_array($_POST);
|
1739 |
+
//@header("CtFilterArray: Passed");
|
1740 |
+
cleantalk_debug("CtFilterArray", "Passed");
|
1741 |
|
1742 |
$checkjs = js_test('ct_checkjs', $_COOKIE, true);
|
1743 |
|
1754 |
$contact_form = true;
|
1755 |
|
1756 |
@ct_get_fields_any($sender_email, $message, $sender_nickname, $subject, $contact_form, $_POST);
|
1757 |
+
//@header("CtGetFieldsAny: Passed");
|
1758 |
+
cleantalk_debug("CtGetFieldsAny", "Passed");
|
1759 |
+
//@header("CtSenderEmail: $sender_email");
|
1760 |
+
cleantalk_debug("CtSenderEmail", $sender_email);
|
1761 |
+
if($contact_form)
|
1762 |
+
{
|
1763 |
+
//@header("CtContactForm: true");
|
1764 |
+
cleantalk_debug("CtContactForm", "true");
|
1765 |
+
}
|
1766 |
+
else
|
1767 |
+
{
|
1768 |
+
//@header("CtContactForm: false");
|
1769 |
+
cleantalk_debug("CtContactForm", "false");
|
1770 |
+
}
|
1771 |
+
|
1772 |
+
|
1773 |
|
1774 |
// Skip submission if no data found
|
1775 |
if ($sender_email===''|| !$contact_form) {
|
1783 |
unset($_POST['TellAFriend_Link']);
|
1784 |
}
|
1785 |
|
1786 |
+
//@header("CtBaseCallBefore: 1");
|
1787 |
+
cleantalk_debug("CtBaseCallBefore", "1");
|
1788 |
+
|
1789 |
$ct_base_call_result = ct_base_call(array(
|
1790 |
'message' => $subject . "\n\n" . $message,
|
1791 |
'example' => null,
|
1795 |
'sender_info' => get_sender_info(),
|
1796 |
'checkjs' => $checkjs
|
1797 |
));
|
1798 |
+
//@header("CtBaseCall: Executed");
|
1799 |
+
cleantalk_debug("CtBaseCall", "Executed");
|
1800 |
|
1801 |
if(isset($_POST['TellAFriend_Link']))
|
1802 |
{
|
1807 |
$ct_result = $ct_base_call_result['ct_result'];
|
1808 |
|
1809 |
if ($ct_result->allow == 0) {
|
1810 |
+
//@header("CtResult: Not Allow");
|
1811 |
+
cleantalk_debug("CtResult", "Not Allow");
|
1812 |
|
1813 |
if (!(defined( 'DOING_AJAX' ) && DOING_AJAX)) {
|
1814 |
+
//@header("AJAX: No");
|
1815 |
+
cleantalk_debug("AJAX", "No");
|
1816 |
global $ct_comment;
|
1817 |
$ct_comment = $ct_result->comment;
|
1818 |
if(isset($_POST['cma-action'])&&$_POST['cma-action']=='add')
|
1832 |
ct_die(null, null);
|
1833 |
}
|
1834 |
} else {
|
1835 |
+
//@header("AJAX: Yes");
|
1836 |
+
cleantalk_debug("AJAX", "Yes");
|
1837 |
echo $ct_result->comment;
|
1838 |
}
|
1839 |
exit;
|
1840 |
}
|
1841 |
+
//@header("CtResult: Allow");
|
1842 |
+
cleantalk_debug("CtResult", "Allow");
|
1843 |
|
1844 |
return null;
|
1845 |
}
|
1869 |
{
|
1870 |
$ct_cnt=0;
|
1871 |
}
|
1872 |
+
//@header("CtExclusions: ".$ct_cnt);
|
1873 |
+
cleantalk_debug("CtExclusions", $ct_cnt);
|
1874 |
+
|
1875 |
+
if (@sizeof($_POST)==0 ||
|
1876 |
+
(isset($_POST['signup_username']) && isset($_POST['signup_email']) && isset($_POST['signup_password'])) ||
|
1877 |
+
(isset($pagenow) && $pagenow == 'wp-login.php') || // WordPress log in form
|
1878 |
+
(isset($pagenow) && $pagenow == 'wp-login.php' && isset($_GET['action']) && $_GET['action']=='lostpassword') ||
|
1879 |
+
strpos($_SERVER['REQUEST_URI'],'/checkout/')!==false ||
|
1880 |
+
strpos($_SERVER['REQUEST_URI'],'/wp-admin/')!==false ||
|
1881 |
+
strpos($_SERVER['REQUEST_URI'],'wp-login.php')!==false||
|
1882 |
+
strpos($_SERVER['REQUEST_URI'],'wp-comments-post.php')!==false ||
|
1883 |
+
@strpos($_SERVER['HTTP_REFERER'],'/wp-admin/')!==false ||
|
1884 |
+
strpos($_SERVER['REQUEST_URI'],'/login/')!==false||
|
1885 |
+
isset($_GET['ptype']) && $_GET['ptype']=='login' ||
|
1886 |
+
check_url_exclusions() ||
|
1887 |
+
ct_check_array_keys($_POST) ||
|
1888 |
+
isset($_POST['ct_checkjs_register_form']) ||
|
1889 |
+
(isset($_POST['signup_username']) && isset($_POST['signup_password_confirm']) && isset($_POST['signup_submit']) ) ||
|
1890 |
+
@intval($ct_options['general_contact_forms_test'])==0 ||
|
1891 |
+
isset($_POST['bbp_topic_content']) ||
|
1892 |
+
isset($_POST['bbp_reply_content']) ||
|
1893 |
+
isset($_POST['fscf_submitted'])
|
1894 |
+
) {
|
1895 |
+
return null;
|
1896 |
+
}
|
1897 |
|
1898 |
$_POST=ct_filter_array($_POST);
|
1899 |
|
2031 |
}
|
2032 |
}
|
2033 |
|
2034 |
+
?>
|
inc/cleantalk-sfw.class.php
CHANGED
@@ -69,7 +69,7 @@ class CleanTalkSFW
|
|
69 |
}
|
70 |
else
|
71 |
{
|
72 |
-
setcookie ('ct_sfw_pass_key', md5($this->ip_str.$ct_options['apikey']), 0, "/");
|
73 |
}
|
74 |
$ct_data['sfw_log'] = $sfw_log;
|
75 |
update_option('cleantalk_data', $ct_data);
|
69 |
}
|
70 |
else
|
71 |
{
|
72 |
+
@setcookie ('ct_sfw_pass_key', md5($this->ip_str.$ct_options['apikey']), 0, "/");
|
73 |
}
|
74 |
$ct_data['sfw_log'] = $sfw_log;
|
75 |
update_option('cleantalk_data', $ct_data);
|
readme.txt
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
=== Anti-Spam by CleanTalk - No Captcha, no comments & registrations spam ===
|
2 |
Contributors: znaeff, shagimuratov, vlad-cleantalk
|
3 |
-
Tags: anti-spam, antispam, bbpress, buddypress, captcha, capcha, captha, catcha, cf7 spam, comments, contact form spam, signup, spam, spammers, spammy, woocommerce, wordpress spam, booking, order, subscription, gravity spam, jetpack, bots, contact form 7, contact form, registrations, ninja, Fast Secure Contact, Gravity forms, formidable, mailchimp, s2member, protection, protect, email, akismet, plugin, contact, recaptcha, google captcha, math, security, login, blacklist, cache, prevent, wordpress, User Frontend, bulk delete, bulk remove, cloudflare, widget, review, auth forms, firewall, ddos,
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 4.3
|
6 |
-
Stable tag: 5.
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
-
Max power, all-in-one, premium anti-spam. No comments spam & registrations spam, no email spam, protects any forms.
|
11 |
|
12 |
== Description ==
|
13 |
No CAPTCHA, no questions, no counting animals, no puzzles, no math and no spam bots.
|
@@ -96,7 +96,7 @@ We have developed antispam for WordPress that would provide **maximum protection
|
|
96 |
|
97 |
The anti-spam method offered by CleanTalk allows to switch from the methods that trouble the communication (CAPTCHA, question-answer etc.) to a more convenient one.
|
98 |
|
99 |
-
CleanTalk is premium anti-spam service for WordPress, please look at the <a href="http://cleantalk.org/price">pricing</a>. The plugin works with cloud anti spam service CleanTalk.
|
100 |
|
101 |
* Up to 99.998% protection against spam bots.
|
102 |
* Time and resources saving.
|
@@ -208,7 +208,7 @@ The plugin has several options to detect spam bots and humans. If you just post
|
|
208 |
The comments will be passed, becuase the plugin detect sender as a human. So, use special email *stop_email@example.com* to test anti-spam or wait a few days to see how the plugin works.
|
209 |
|
210 |
= Is it free or paid? =
|
211 |
-
The plugin is free. But the plugin uses
|
212 |
|
213 |
= Can I use CleanTalk with cache plugins? =
|
214 |
Anti-spam by CleanTalk doesn't use static HTML code into templates, so all anti-spam functions works correctly with any WordPress cache plugins.
|
@@ -350,6 +350,10 @@ WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enab
|
|
350 |
1. Setup Android/iOS app to have push notices when new legitiamte comments/registrations or contactcs appears on the website.
|
351 |
|
352 |
== Changelog ==
|
|
|
|
|
|
|
|
|
353 |
= 5.28.7 2015-10-23 =
|
354 |
* Optimized PHP sessions creation algorithm. This fix should increase plugin perfomance on hostings without retenion of PHP sessions files.
|
355 |
* Removed autoredirection to plugin settings after plugin activation.
|
@@ -832,6 +836,10 @@ WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enab
|
|
832 |
* First version
|
833 |
|
834 |
== Upgrade Notice ==
|
|
|
|
|
|
|
|
|
835 |
= 5.28.7 2015-10-23 =
|
836 |
* Major backend peromance fix.
|
837 |
|
1 |
=== Anti-Spam by CleanTalk - No Captcha, no comments & registrations spam ===
|
2 |
Contributors: znaeff, shagimuratov, vlad-cleantalk
|
3 |
+
Tags: anti-spam, antispam, bbpress, buddypress, captcha, capcha, captha, catcha, cf7 spam, comments, contact form spam, signup, spam, spammers, spammy, woocommerce, wordpress spam, booking, order, subscription, gravity spam, jetpack, bots, contact form 7, contact form, registrations, ninja, Fast Secure Contact, Gravity forms, formidable, mailchimp, s2member, protection, protect, email, akismet, plugin, contact, recaptcha, google captcha, math, security, login, blacklist, cache, prevent, wordpress, User Frontend, bulk delete, bulk remove, cloudflare, widget, review, auth forms, firewall, ddos, cleantalk, mailpoet
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 4.3
|
6 |
+
Stable tag: 5.29
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
+
Max power spam protection, all-in-one, premium anti-spam. No comments spam & registrations spam, no email spam, protects any forms. Forget spam.
|
11 |
|
12 |
== Description ==
|
13 |
No CAPTCHA, no questions, no counting animals, no puzzles, no math and no spam bots.
|
96 |
|
97 |
The anti-spam method offered by CleanTalk allows to switch from the methods that trouble the communication (CAPTCHA, question-answer etc.) to a more convenient one.
|
98 |
|
99 |
+
CleanTalk is premium anti-spam service for WordPress, please look at the <a href="http://cleantalk.org/price">pricing</a>. The plugin works with cloud anti spam service CleanTalk. We try to provide anti-spam service at the highest level and we can not afford to offer a free version of our service, as this will immediately affect the quality of providing anti-spam protection. Paying for a year of anti-spam service, you save a lot more and get:
|
100 |
|
101 |
* Up to 99.998% protection against spam bots.
|
102 |
* Time and resources saving.
|
208 |
The comments will be passed, becuase the plugin detect sender as a human. So, use special email *stop_email@example.com* to test anti-spam or wait a few days to see how the plugin works.
|
209 |
|
210 |
= Is it free or paid? =
|
211 |
+
The plugin is free. But the plugin uses paid cloud service CleanTalk to filter spam bots. You have to register an account and purchase 1 year anti-spam license with 60 days to get money back.
|
212 |
|
213 |
= Can I use CleanTalk with cache plugins? =
|
214 |
Anti-spam by CleanTalk doesn't use static HTML code into templates, so all anti-spam functions works correctly with any WordPress cache plugins.
|
350 |
1. Setup Android/iOS app to have push notices when new legitiamte comments/registrations or contactcs appears on the website.
|
351 |
|
352 |
== Changelog ==
|
353 |
+
= 5.29 2015-10-27 =
|
354 |
+
* Optimized performance
|
355 |
+
* Fixed bugs in custom contact forms spam checking
|
356 |
+
|
357 |
= 5.28.7 2015-10-23 =
|
358 |
* Optimized PHP sessions creation algorithm. This fix should increase plugin perfomance on hostings without retenion of PHP sessions files.
|
359 |
* Removed autoredirection to plugin settings after plugin activation.
|
836 |
* First version
|
837 |
|
838 |
== Upgrade Notice ==
|
839 |
+
= 5.29 2015-10-27 =
|
840 |
+
* Optimized performance
|
841 |
+
* Fixed bugs in custom contact forms spam checking
|
842 |
+
|
843 |
= 5.28.7 2015-10-23 =
|
844 |
* Major backend peromance fix.
|
845 |
|