Spam protection, AntiSpam, FireWall by CleanTalk - Version 5.45.1

Version Description

July 26 2016 = * Fixed issue with missed spam messages, subscriptions. * Improved bulk spam test for comments. Now the plugin will not mark as Spam comments, if a comment sender (IP address) has spam activity more then 30 days ago.

Download this release

Release Info

Developer shagimuratov
Plugin Icon 128x128 Spam protection, AntiSpam, FireWall by CleanTalk
Version 5.45.1
Comparing to
See all releases

Code changes from version 5.45 to 5.45.1

cleantalk.php CHANGED
@@ -3,12 +3,12 @@
3
  Plugin Name: Spam Protection 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. Formerly Anti-Spam by CleanTalk.
6
- Version: 5.45
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
- $cleantalk_plugin_version='5.45';
11
- $ct_agent_version = 'wordpress-545';
12
  $cleantalk_executed=false;
13
  $ct_sfw_updated = false;
14
 
3
  Plugin Name: Spam Protection 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. Formerly Anti-Spam by CleanTalk.
6
+ Version: 5.45.1
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
+ $cleantalk_plugin_version='5.45.1';
11
+ $ct_agent_version = 'wordpress-5451';
12
  $cleantalk_executed=false;
13
  $ct_sfw_updated = false;
14
 
inc/cleantalk-admin.php CHANGED
@@ -611,9 +611,10 @@ function ct_input_apikey() {
611
  if (ct_valid_key($value) === false && !$is_wpmu) {
612
  echo "<script>var cleantalk_good_key=false;</script>";
613
  if (function_exists('curl_init') && function_exists('json_decode')) {
614
- echo '<br /><br /><input name="get_apikey_auto" type="submit" class="cleantalk_manual_link" value="' . __('Get access key automatically', 'cleantalk') . '" />';
615
- echo "&nbsp;" . __("or") . "&nbsp;";
616
  echo "<a target='__blank' style='' href='https://cleantalk.org/register?platform=wordpress&email=".urlencode(ct_get_admin_email())."&website=".urlencode(parse_url(get_option('siteurl'),PHP_URL_HOST))."'>".__('Click here to get access key manually', 'cleantalk')."</a>";
 
 
617
  echo "<br />";
618
  echo "<br />";
619
 
611
  if (ct_valid_key($value) === false && !$is_wpmu) {
612
  echo "<script>var cleantalk_good_key=false;</script>";
613
  if (function_exists('curl_init') && function_exists('json_decode')) {
614
+ echo '<br /><br />';
 
615
  echo "<a target='__blank' style='' href='https://cleantalk.org/register?platform=wordpress&email=".urlencode(ct_get_admin_email())."&website=".urlencode(parse_url(get_option('siteurl'),PHP_URL_HOST))."'>".__('Click here to get access key manually', 'cleantalk')."</a>";
616
+ echo "&nbsp;" . __("or") . "&nbsp;";
617
+ echo '<input name="get_apikey_auto" type="submit" class="cleantalk_manual_link" value="' . __('Get access key automatically', 'cleantalk') . '" />';
618
  echo "<br />";
619
  echo "<br />";
620
 
inc/cleantalk-comments-checkspam.js CHANGED
@@ -82,8 +82,10 @@ function ct_send_comments()
82
  },
83
  error: function(jqXHR, textStatus, errorThrown) {
84
  if(textStatus === 'timeout') {
85
- alert('Failed from timeout. Going to check comments again.');
86
- ct_send_comments();
 
 
87
  }
88
  },
89
  timeout: 10000
82
  },
83
  error: function(jqXHR, textStatus, errorThrown) {
84
  if(textStatus === 'timeout') {
85
+ if(confirm('Failed from timeout. Going to check comments again.')) {
86
+ ct_send_comments();
87
+ } else {
88
+ }
89
  }
90
  },
91
  timeout: 10000
inc/cleantalk-comments.php CHANGED
@@ -282,6 +282,9 @@ function ct_ajax_check_comments()
282
  check_ajax_referer( 'ct_secret_nonce', 'security' );
283
  global $ct_options;
284
  $ct_options = ct_get_options();
 
 
 
285
 
286
  $args_unchecked = array(
287
  'meta_query' => array(
@@ -314,7 +317,7 @@ function ct_ajax_check_comments()
314
  $data[]=$u[$i]->comment_author_email;
315
  }
316
  $data=implode(',',$data);
317
-
318
  $request=Array();
319
  $request['method_name'] = 'spam_check';
320
  $request['auth_key'] = $ct_options['apikey'];
@@ -336,15 +339,33 @@ function ct_ajax_check_comments()
336
  {
337
  for($i=0;$i<sizeof($u);$i++)
338
  {
 
 
 
339
  add_comment_meta($u[$i]->comment_ID,'ct_checked',date("Y-m-d H:m:s"),true);
340
  $uip=$u[$i]->comment_author_IP;
341
  if(empty($uip))continue;
342
  $uim=$u[$i]->comment_author_email;
343
  if(empty($uim))continue;
344
- if(isset($result->data->$uip) && $result->data->$uip->appears==1 || isset($result->data->$uim) && $result->data->$uim->appears==1)
 
 
 
 
 
 
345
  {
346
- add_comment_meta($u[$i]->comment_ID,'ct_marked_as_spam','1',true);
 
347
  }
 
 
 
 
 
 
 
 
348
  }
349
  print 1;
350
  }
@@ -423,7 +444,7 @@ function ct_ajax_insert_comments()
423
  check_ajax_referer( 'ct_secret_nonce', 'security' );
424
  $time = current_time('mysql');
425
 
426
- for($i=0;$i<500;$i++)
427
  {
428
  $rnd=mt_rand(1,100);
429
  if($rnd<20)
282
  check_ajax_referer( 'ct_secret_nonce', 'security' );
283
  global $ct_options;
284
  $ct_options = ct_get_options();
285
+
286
+ // How many days we use an IP to detect spam.
287
+ $penalty_days = 30;
288
 
289
  $args_unchecked = array(
290
  'meta_query' => array(
317
  $data[]=$u[$i]->comment_author_email;
318
  }
319
  $data=implode(',',$data);
320
+
321
  $request=Array();
322
  $request['method_name'] = 'spam_check';
323
  $request['auth_key'] = $ct_options['apikey'];
339
  {
340
  for($i=0;$i<sizeof($u);$i++)
341
  {
342
+ $mark_spam = false;
343
+ $update_time = 0;
344
+
345
  add_comment_meta($u[$i]->comment_ID,'ct_checked',date("Y-m-d H:m:s"),true);
346
  $uip=$u[$i]->comment_author_IP;
347
  if(empty($uip))continue;
348
  $uim=$u[$i]->comment_author_email;
349
  if(empty($uim))continue;
350
+
351
+ if(isset($result->data->$uip) && $result->data->$uip->appears == 1)
352
+ {
353
+ $mark_spam = true;
354
+ $update_time = strtotime($result->data->$uip->updated);
355
+ }
356
+ if(isset($result->data->$uim) && $result->data->$uim->appears==1)
357
  {
358
+ $mark_spam = true;
359
+ $update_time = strtotime($result->data->$uim->updated) > $update_time ? strtotime($result->data->$uim->updated) : $update_time;
360
  }
361
+
362
+ // Do not use the spam records becaus it was a spammer far time ago.
363
+ if (time() - $update_time > 86400 * $penalty_days) {
364
+ $mark_spam = false;
365
+ }
366
+ if ($mark_spam) {
367
+ add_comment_meta($u[$i]->comment_ID,'ct_marked_as_spam','1',true);
368
+ }
369
  }
370
  print 1;
371
  }
444
  check_ajax_referer( 'ct_secret_nonce', 'security' );
445
  $time = current_time('mysql');
446
 
447
+ for($i=0;$i<250;$i++)
448
  {
449
  $rnd=mt_rand(1,100);
450
  if($rnd<20)
inc/cleantalk-public.php CHANGED
@@ -1875,9 +1875,9 @@ function ct_contact_form_validate () {
1875
  ) {
1876
  return null;
1877
  }
1878
-
1879
  // Do not execute anti-spam test for logged in users.
1880
- if (isset($_COOKIE[LOGGED_IN_COOKIE]) || $ct_options['protect_logged_in'] != 1) {
1881
  return null;
1882
  }
1883
 
1875
  ) {
1876
  return null;
1877
  }
1878
+
1879
  // Do not execute anti-spam test for logged in users.
1880
+ if (isset($_COOKIE[LOGGED_IN_COOKIE]) && $ct_options['protect_logged_in'] != 1) {
1881
  return null;
1882
  }
1883
 
readme.txt CHANGED
@@ -2,15 +2,15 @@
2
  Contributors: znaeff, shagimuratov, serge00
3
  Tags: spam, anti-spam, antispam, anti spam, bbpress, buddypress, captcha, capcha, captha, catcha, cf7 spam, comments, contact form spam, signup, 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, google recaptcha, math, security, login, blacklist, prevent spam comments, wordpress, User Frontend, bulk delete, bulk remove, cloudflare, widget, review, auth forms, firewall, ddos, cleantalk, mailpoet, profile builder, comment spam, registration spam, spam comments, comment moderation, spam bots, block spam, signup spam, spam blocker, spam filter, user registration spam,pingback,trackback, anti-spam plugin, varnish, amp, spam free, userpro
4
  Requires at least: 3.0
5
- Tested up to: 4.5.3
6
- Stable tag: 5.45
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
  Spam protection, anti-spam, all-in-one, premium plug-in. No comments spam & registrations spam, no email spam, protects any forms. Forget spam.
11
 
12
  == Description ==
13
- No CAPTCHA, no questions, no animal counting, no puzzles, no math and no spam bots. Formerly 'Anti-Spam by CleanTalk'.
14
 
15
  = Anti-Spam features =
16
  1. Stops spam comments.
@@ -22,6 +22,9 @@ No CAPTCHA, no questions, no animal counting, no puzzles, no math and no spam bo
22
  1. Stops spam in widgets.
23
  1. Checks the existing comments for spam.
24
 
 
 
 
25
  = Public reviews =
26
  > Using CleanTalk on WPLift was a great test as we receive huge amounts of spam.
27
  > *Oliver Dale, <a href="http://wplift.com/wordpress-anti-spam-plugin" target="_blank">WPLift.com</a>.*
@@ -469,6 +472,10 @@ WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enab
469
  1. CleanTalk works faster than most of other anti-spam plugins.
470
 
471
  == Changelog ==
 
 
 
 
472
  = 5.45 July 21 2016 =
473
  * Optimized bulk spam comments deletion.
474
  * Turned off JavaScript anti-spam cookies if the option 'Set cookies' is turned off. It helps to avoid issues with Varnish.
@@ -1092,6 +1099,10 @@ WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enab
1092
  * First version
1093
 
1094
  == Upgrade Notice ==
 
 
 
 
1095
  = 5.45 July 21 2016 =
1096
  * Optimized bulk spam comments deletion.
1097
  * Turned off JavaScript anti-spam cookies if the option 'Set cookies' is turned off. It helps to avoid issues with Varnish.
2
  Contributors: znaeff, shagimuratov, serge00
3
  Tags: spam, anti-spam, antispam, anti spam, bbpress, buddypress, captcha, capcha, captha, catcha, cf7 spam, comments, contact form spam, signup, 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, google recaptcha, math, security, login, blacklist, prevent spam comments, wordpress, User Frontend, bulk delete, bulk remove, cloudflare, widget, review, auth forms, firewall, ddos, cleantalk, mailpoet, profile builder, comment spam, registration spam, spam comments, comment moderation, spam bots, block spam, signup spam, spam blocker, spam filter, user registration spam,pingback,trackback, anti-spam plugin, varnish, amp, spam free, userpro
4
  Requires at least: 3.0
5
+ Tested up to: 4.6
6
+ Stable tag: 5.45.1
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
  Spam protection, anti-spam, all-in-one, premium plug-in. No comments spam & registrations spam, no email spam, protects any forms. Forget spam.
11
 
12
  == Description ==
13
+ No CAPTCHA, no questions, no animal counting, no puzzles, no math and no spam bots. Formerly "Anti-Spam by CleanTalk".
14
 
15
  = Anti-Spam features =
16
  1. Stops spam comments.
22
  1. Stops spam in widgets.
23
  1. Checks the existing comments for spam.
24
 
25
+ = FREE TRIAL THEN $8 PER YEAR =
26
+ CleanTalk is a free plugin which work with the premium Cloud Anti-Spam service cleantalk.org. This plugin as a service https://en.wikipedia.org/wiki/Software_as_a_service.
27
+
28
  = Public reviews =
29
  > Using CleanTalk on WPLift was a great test as we receive huge amounts of spam.
30
  > *Oliver Dale, <a href="http://wplift.com/wordpress-anti-spam-plugin" target="_blank">WPLift.com</a>.*
472
  1. CleanTalk works faster than most of other anti-spam plugins.
473
 
474
  == Changelog ==
475
+ = 5.45.1 July 26 2016 =
476
+ * Fixed issue with missed spam messages, subscriptions.
477
+ * Improved bulk spam test for comments. Now the plugin will not mark as Spam comments, if a comment sender (IP address) has spam activity more then 30 days ago.
478
+
479
  = 5.45 July 21 2016 =
480
  * Optimized bulk spam comments deletion.
481
  * Turned off JavaScript anti-spam cookies if the option 'Set cookies' is turned off. It helps to avoid issues with Varnish.
1099
  * First version
1100
 
1101
  == Upgrade Notice ==
1102
+ = 5.45.1 July 26 2016 =
1103
+ * Fixed issue with missed spam messages, subscriptions.
1104
+ * Improved bulk spam test for comments. Now the plugin will not mark as Spam comments, if a comment sender (IP address) has spam activity more then 30 days ago.
1105
+
1106
  = 5.45 July 21 2016 =
1107
  * Optimized bulk spam comments deletion.
1108
  * Turned off JavaScript anti-spam cookies if the option 'Set cookies' is turned off. It helps to avoid issues with Varnish.