Spam protection, AntiSpam, FireWall by CleanTalk - Version 4.2

Version Description

2014-10-20 = * Fixed double checks issue for BuddyPress. * Increased timeout limits to find the work server.

Download this release

Release Info

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

Code changes from version 4.1 to 4.2

Files changed (3) hide show
  1. cleantalk.class.php +2 -3
  2. cleantalk.php +30 -13
  3. readme.txt +13 -6
cleantalk.class.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Cleantalk base class
4
  *
5
- * @version 1.31
6
  * @package Cleantalk
7
  * @subpackage Base
8
  * @author Сleantalk team (welcome@cleantalk.org)
@@ -403,7 +403,7 @@ class Cleantalk {
403
  * Minimal server response in miliseconds to catch the server
404
  *
405
  */
406
- public $min_server_timeout = 100;
407
 
408
  /**
409
  * Function checks whether it is possible to publish the message
@@ -847,7 +847,6 @@ class Cleantalk {
847
  $fast_server_found = true;
848
  }
849
  }
850
-
851
  if (count($r_temp)){
852
  ksort($r_temp);
853
  $response = $r_temp;
2
  /**
3
  * Cleantalk base class
4
  *
5
+ * @version 1.32
6
  * @package Cleantalk
7
  * @subpackage Base
8
  * @author Сleantalk team (welcome@cleantalk.org)
403
  * Minimal server response in miliseconds to catch the server
404
  *
405
  */
406
+ public $min_server_timeout = 150;
407
 
408
  /**
409
  * Function checks whether it is possible to publish the message
847
  $fast_server_found = true;
848
  }
849
  }
 
850
  if (count($r_temp)){
851
  ksort($r_temp);
852
  $response = $r_temp;
cleantalk.php CHANGED
@@ -3,14 +3,14 @@
3
  Plugin Name: Anti-spam by CleanTalk
4
  Plugin URI: http://cleantalk.org
5
  Description: Cloud antispam for comments, registrations and contacts. The plugin doesn't use CAPTCHA, Q&A, math, counting animals or quiz to stop spam bots.
6
- Version: 4.1
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
 
11
  define('CLEANTALK_PLUGIN_DIR', plugin_dir_path(__FILE__));
12
 
13
- $ct_agent_version = 'wordpress-41';
14
  $ct_plugin_name = 'Anti-spam by CleanTalk';
15
  $ct_checkjs_frm = 'ct_checkjs_frm';
16
  $ct_checkjs_register_form = 'ct_checkjs_register_form';
@@ -87,6 +87,10 @@ $ct_direct_post = 0;
87
  // WP admin email notice interval in seconds
88
  $ct_admin_notoice_period = 10800;
89
 
 
 
 
 
90
  // Init action.
91
  add_action('init', 'ct_init', 1);
92
 
@@ -1172,6 +1176,8 @@ function ct_login_message($message) {
1172
  * @return array with errors
1173
  */
1174
  function ct_registration_errors_wpmu($errors) {
 
 
1175
  //
1176
  // Multisite actions
1177
  //
@@ -1194,9 +1200,9 @@ function ct_registration_errors_wpmu($errors) {
1194
 
1195
  // Show CleanTalk errors in user_name field
1196
  if (isset($errors['errors']->errors['ct_error'])) {
1197
- $errors['errors']->errors['user_name'] = $errors['errors']->errors['ct_error'];
1198
- unset($errors['errors']->errors['ct_error']);
1199
- }
1200
 
1201
  return $errors;
1202
  }
@@ -1214,13 +1220,18 @@ function ct_register_post($sanitized_user_login = null, $user_email = null, $err
1214
  * @return array with errors
1215
  */
1216
  function ct_registration_errors($errors, $sanitized_user_login = null, $user_email = null) {
1217
- global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label;
1218
 
1219
  // Go out if a registrered user action
1220
  if (ct_is_user_enable() === false) {
1221
  return $errors;
1222
  }
1223
-
 
 
 
 
 
1224
  //
1225
  // The function already executed
1226
  // It happens when used ct_register_post();
@@ -1241,12 +1252,17 @@ function ct_registration_errors($errors, $sanitized_user_login = null, $user_ema
1241
  $user_email = $_POST['signup_email'];
1242
  $buddypress = true;
1243
  }
1244
-
1245
- $options = ct_get_options();
1246
- if ($options['registrations_test'] == 0) {
 
 
 
 
 
1247
  return $errors;
1248
  }
1249
-
1250
  $submit_time = submit_time_test();
1251
 
1252
  $sender_info = get_sender_info();
@@ -1286,7 +1302,7 @@ function ct_registration_errors($errors, $sanitized_user_login = null, $user_ema
1286
  $ct_request->sender_info = $sender_info;
1287
  $ct_request->js_on = $checkjs;
1288
  $ct_request->submit_time = $submit_time;
1289
-
1290
  $ct_result = $ct->isAllowUser($ct_request);
1291
  if ($ct->server_change) {
1292
  update_option(
@@ -1316,9 +1332,10 @@ function ct_registration_errors($errors, $sanitized_user_login = null, $user_ema
1316
  $_SESSION[$ct_formtime_label] = time();
1317
 
1318
  if ($buddypress === true) {
1319
- $bp->signup->errors['signup_username'] = $ct_result->comment;
1320
  } else {
1321
  $errors->add('ct_error', $ct_result->comment);
 
1322
  }
1323
  } else {
1324
  if ($ct_result->id !== null) {
3
  Plugin Name: Anti-spam by CleanTalk
4
  Plugin URI: http://cleantalk.org
5
  Description: Cloud antispam for comments, registrations and contacts. The plugin doesn't use CAPTCHA, Q&A, math, counting animals or quiz to stop spam bots.
6
+ Version: 4.2
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
 
11
  define('CLEANTALK_PLUGIN_DIR', plugin_dir_path(__FILE__));
12
 
13
+ $ct_agent_version = 'wordpress-42';
14
  $ct_plugin_name = 'Anti-spam by CleanTalk';
15
  $ct_checkjs_frm = 'ct_checkjs_frm';
16
  $ct_checkjs_register_form = 'ct_checkjs_register_form';
87
  // WP admin email notice interval in seconds
88
  $ct_admin_notoice_period = 10800;
89
 
90
+ // Sevice negative comment to visitor.
91
+ // It uses for BuddyPress registrations to avoid double checks
92
+ $ct_negative_comment = null;
93
+
94
  // Init action.
95
  add_action('init', 'ct_init', 1);
96
 
1176
  * @return array with errors
1177
  */
1178
  function ct_registration_errors_wpmu($errors) {
1179
+ global $ct_signup_done;
1180
+
1181
  //
1182
  // Multisite actions
1183
  //
1200
 
1201
  // Show CleanTalk errors in user_name field
1202
  if (isset($errors['errors']->errors['ct_error'])) {
1203
+ $errors['errors']->errors['user_name'] = $errors['errors']->errors['ct_error'];
1204
+ unset($errors['errors']->errors['ct_error']);
1205
+ }
1206
 
1207
  return $errors;
1208
  }
1220
  * @return array with errors
1221
  */
1222
  function ct_registration_errors($errors, $sanitized_user_login = null, $user_email = null) {
1223
+ global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label, $ct_negative_comment;
1224
 
1225
  // Go out if a registrered user action
1226
  if (ct_is_user_enable() === false) {
1227
  return $errors;
1228
  }
1229
+
1230
+ $options = ct_get_options();
1231
+ if ($options['registrations_test'] == 0) {
1232
+ return $errors;
1233
+ }
1234
+
1235
  //
1236
  // The function already executed
1237
  // It happens when used ct_register_post();
1252
  $user_email = $_POST['signup_email'];
1253
  $buddypress = true;
1254
  }
1255
+
1256
+ //
1257
+ // Break tests because we already have servers response
1258
+ //
1259
+ if ($buddypress && $ct_signup_done) {
1260
+ if ($ct_negative_comment) {
1261
+ $bp->signup->errors['signup_username'] = $ct_negative_comment;
1262
+ }
1263
  return $errors;
1264
  }
1265
+
1266
  $submit_time = submit_time_test();
1267
 
1268
  $sender_info = get_sender_info();
1302
  $ct_request->sender_info = $sender_info;
1303
  $ct_request->js_on = $checkjs;
1304
  $ct_request->submit_time = $submit_time;
1305
+
1306
  $ct_result = $ct->isAllowUser($ct_request);
1307
  if ($ct->server_change) {
1308
  update_option(
1332
  $_SESSION[$ct_formtime_label] = time();
1333
 
1334
  if ($buddypress === true) {
1335
+ $bp->signup->errors['signup_username'] = $ct_result->comment;
1336
  } else {
1337
  $errors->add('ct_error', $ct_result->comment);
1338
+ $ct_negative_comment = $ct_result->comment;
1339
  }
1340
  } else {
1341
  if ($ct_result->id !== null) {
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: znaeff, shagimuratov
3
  Tags: antispam, anti-spam, anti spam, spam, spammers, captcha, comments, registration, contact form, blacklist, math, signup, formidable, bot, spam bots, spammy, s2member, wordpress, support, BuddyPress, bbpress, landing pages, fast secure contact form, WooCommerce, jetpack, cf7, form
4
  Requires at least: 3.0
5
  Tested up to: 4.0
6
- Stable tag: 4.1
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -21,7 +21,7 @@ No CAPTCHA, no questions, no counting animals, no puzzles, no math and no spam b
21
  = Spam protection =
22
  * WordPress, JetPack comments.
23
  * WordPress, BuddyPress, bbPress, S2Member, WooCommerce registrations.
24
- * Formidable forms, Contact form 7, JetPack Contact form, Fast Secure Contact form any themes/custom contact form.
25
  * WooCommerce review form.
26
  * WordPress Landing Pages.
27
 
@@ -37,7 +37,7 @@ We have developed antispam for WordPress that would provide **maximum protection
37
 
38
  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.
39
 
40
- The CleanTalk is premium anti spam for WordPress, please look at the <a href="http://cleantalk.org/price">pricing</a>. We try to provide the 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 service, you save a lot more and get:
41
 
42
  * 100% protection against spam bots
43
  * Time and resources saving
@@ -48,17 +48,17 @@ The CleanTalk is premium anti spam for WordPress, please look at the <a href="ht
48
  * 24/7 technical support
49
  * Clear statistics
50
  * No captcha, puzzles, etc.
51
- * Free mobile app
52
 
53
  = How to protect sites from spam bots without CAPTCHA? =
54
  The most popular method is CAPTCHA -- the annoying picture with curved and sloping symbols, which are offered to the visitor to fill in. It is supposed that spam bots won’t discern these CAPTCHA, but a visitor will. CAPTCHA provokes great irritation, but if one wants to speak out, he has to fill in these symbols time after time, making mistakes and starting once again.
55
  Sometimes CAPTCHA reminds doodle 2x year old child. For users with vision problems captcha is just an insurmountable obstacle. Users hate captcha. Captcha for users means "hate". Unreadable CAPTCHA stops about 80% of site visitors. After 2 failed attempts to bring it up to 95% reject further attempts.
56
- At the sight of CAPTCHA and after input errors, many visitors leave the resource. Thus, CAPTCHA helps to protect the resource both from bots and visitors. CAPTCHA is not a panacea from spam. Doubts Concerning the Need for CAPTCHA?
57
 
58
  = Additional features =
59
  * Online, daily and weekly anti spam reports traffic VS spam.
60
  * Apps for iPhone, Android to control anti spam service, comments, signups, contacts. With traffic and spam statistics for last 7 days.
61
- * Anti-spam apps for most popular CMS on cleantalk.org.
62
 
63
  = We recommend =
64
  * Audience engagement plugin <a href="http://wordpress.org/plugins/feedweb/">Feedweb</a>
@@ -151,6 +151,10 @@ WordPress 3.0 at least. PHP 4, 5 with CURL or file_get_contents() function and e
151
  1. Anti spam stopped spam bot at the CAPTCHA less registration form.
152
 
153
  == Changelog ==
 
 
 
 
154
  = 4.1 2014-10-13 =
155
  * Optimized code for manual moderation feedback sending.
156
  * Optimized anti spam algorithms for comments, contacts and signups.
@@ -408,6 +412,9 @@ WordPress 3.0 at least. PHP 4, 5 with CURL or file_get_contents() function and e
408
  * First version
409
 
410
  == Upgrade Notice ==
 
 
 
411
  = 4.1 2014-10-13 =
412
  Minor anti spam improvements for contacts, registration and contact forms.
413
 
3
  Tags: antispam, anti-spam, anti spam, spam, spammers, captcha, comments, registration, contact form, blacklist, math, signup, formidable, bot, spam bots, spammy, s2member, wordpress, support, BuddyPress, bbpress, landing pages, fast secure contact form, WooCommerce, jetpack, cf7, form
4
  Requires at least: 3.0
5
  Tested up to: 4.0
6
+ Stable tag: 4.2
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
21
  = Spam protection =
22
  * WordPress, JetPack comments.
23
  * WordPress, BuddyPress, bbPress, S2Member, WooCommerce registrations.
24
+ * Formidable forms, Contact form 7, JetPack Contact form, Fast Secure Contact form, Ninja forms, Landing pages and any themes/custom contact form.
25
  * WooCommerce review form.
26
  * WordPress Landing Pages.
27
 
37
 
38
  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.
39
 
40
+ The CleanTalk is premium anti spam for WordPress, please look at the <a href="http://cleantalk.org/price">pricing</a>. 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:
41
 
42
  * 100% protection against spam bots
43
  * Time and resources saving
48
  * 24/7 technical support
49
  * Clear statistics
50
  * No captcha, puzzles, etc.
51
+ * Free mobile app to control anti spam function at your website.
52
 
53
  = How to protect sites from spam bots without CAPTCHA? =
54
  The most popular method is CAPTCHA -- the annoying picture with curved and sloping symbols, which are offered to the visitor to fill in. It is supposed that spam bots won’t discern these CAPTCHA, but a visitor will. CAPTCHA provokes great irritation, but if one wants to speak out, he has to fill in these symbols time after time, making mistakes and starting once again.
55
  Sometimes CAPTCHA reminds doodle 2x year old child. For users with vision problems captcha is just an insurmountable obstacle. Users hate captcha. Captcha for users means "hate". Unreadable CAPTCHA stops about 80% of site visitors. After 2 failed attempts to bring it up to 95% reject further attempts.
56
+ At the sight of CAPTCHA and after input errors, many visitors leave the resource. Thus, CAPTCHA helps to protect the resource both from spam bots and visitors. CAPTCHA is not a panacea from spam. Doubts concerning the Need for CAPTCHA?
57
 
58
  = Additional features =
59
  * Online, daily and weekly anti spam reports traffic VS spam.
60
  * Apps for iPhone, Android to control anti spam service, comments, signups, contacts. With traffic and spam statistics for last 7 days.
61
+ * Anti spam apps for most popular CMS on cleantalk.org.
62
 
63
  = We recommend =
64
  * Audience engagement plugin <a href="http://wordpress.org/plugins/feedweb/">Feedweb</a>
151
  1. Anti spam stopped spam bot at the CAPTCHA less registration form.
152
 
153
  == Changelog ==
154
+ = 4.2 2014-10-20 =
155
+ * Fixed double checks issue for BuddyPress.
156
+ * Increased timeout limits to find the work server.
157
+
158
  = 4.1 2014-10-13 =
159
  * Optimized code for manual moderation feedback sending.
160
  * Optimized anti spam algorithms for comments, contacts and signups.
412
  * First version
413
 
414
  == Upgrade Notice ==
415
+ = 4.2 2014-10-20 =
416
+ Increased plugin perfomance for BuddyPress registrations.
417
+
418
  = 4.1 2014-10-13 =
419
  Minor anti spam improvements for contacts, registration and contact forms.
420