Spam protection, AntiSpam, FireWall by CleanTalk - Version 4.11

Version Description

2014-12-22 = * Improved anti spam protection for custom contact/registration/subscribe forms. * Improved anti spam protection for comments. * Accelerated plugin speed for comments, regirstrations and contacts. * Added translation to French.

Download this release

Release Info

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

Code changes from version 4.10 to 4.11

Files changed (4) hide show
  1. cleantalk.class.php +4 -5
  2. cleantalk.php +38 -33
  3. i18n/cleantalk-fr_FR.mo +0 -0
  4. readme.txt +18 -6
cleantalk.class.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Cleantalk base class
4
  *
5
- * @version 1.32
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
@@ -724,7 +724,6 @@ class Cleantalk {
724
  }
725
 
726
  if (($result === false || $result->errno != 0) && $this->stay_on_server == false) {
727
-
728
  // Split server url to parts
729
  preg_match("@^(https?://)([^/:]+)(.*)@i", $this->server_url, $matches);
730
  $url_prefix = '';
@@ -750,13 +749,13 @@ class Cleantalk {
750
  if ($server['host'] === 'localhost' || $server['ip'] === null) {
751
  $work_url = $server['host'];
752
  } else {
753
- $server_host = gethostbyaddr($server['ip']);
754
  $work_url = $server_host;
755
  }
756
  $work_url = $url_prefix . $work_url;
757
  if (isset($url_suffix))
758
  $work_url = $work_url . $url_suffix;
759
-
760
  $this->work_url = $work_url;
761
  $this->server_ttl = $server['ttl'];
762
 
2
  /**
3
  * Cleantalk base class
4
  *
5
+ * @version 1.33
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 = 50;
407
 
408
  /**
409
  * Function checks whether it is possible to publish the message
724
  }
725
 
726
  if (($result === false || $result->errno != 0) && $this->stay_on_server == false) {
 
727
  // Split server url to parts
728
  preg_match("@^(https?://)([^/:]+)(.*)@i", $this->server_url, $matches);
729
  $url_prefix = '';
749
  if ($server['host'] === 'localhost' || $server['ip'] === null) {
750
  $work_url = $server['host'];
751
  } else {
752
+ $server_host = $server['ip'];
753
  $work_url = $server_host;
754
  }
755
  $work_url = $url_prefix . $work_url;
756
  if (isset($url_suffix))
757
  $work_url = $work_url . $url_suffix;
758
+
759
  $this->work_url = $work_url;
760
  $this->server_ttl = $server['ttl'];
761
 
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.10
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-410';
14
  $ct_plugin_name = 'Anti-spam by CleanTalk';
15
  $ct_checkjs_frm = 'ct_checkjs_frm';
16
  $ct_checkjs_register_form = 'ct_checkjs_register_form';
@@ -435,7 +435,7 @@ function ct_cookies_test ($test = false) {
435
  $result = 0;
436
  }
437
  } else {
438
- setcookie($cookie_label, $secret_hash, 0, '/');
439
 
440
  if ($test) {
441
  $result = 0;
@@ -575,14 +575,12 @@ ctSetCookie("%s", "%s", "%s");
575
  <script type="text/javascript">
576
  var ct_input_name = \'%s\';
577
  var ct_input_value = document.getElementById(ct_input_name).value;
578
- document.getElementById(ct_input_name).value = document.getElementById(ct_input_name).value.replace(ct_input_value, %s);
579
  </script>
580
  ';
581
  $html = sprintf($html, $field_id, $field_name, $ct_checkjs_def, $field_id, $ct_input_challenge);
582
  };
583
 
584
- //$html .= '<noscript><p><b>Please enable JavaScript to pass anti-spam protection!</b><br />Here are the instructions how to enable JavaScript in your web browser <a href="http://www.enable-javascript.com" rel="nofollow" target="_blank">http://www.enable-javascript.com</a>. <br />' . $ct_plugin_name . '.</p></noscript>';
585
-
586
  // Simplify JS code
587
  // and fixing issue with wpautop()
588
  $html = str_replace(array("\n","\r"),'', $html);
@@ -1787,39 +1785,46 @@ function ct_contact_form_validate () {
1787
  $sender_nickname = null;
1788
  $subject = '';
1789
  $message = '';
1790
- $contact_form = false;
1791
 
1792
- foreach ($_POST as $k => $v) {
1793
- if ($sender_email === null && isset($v)) {
1794
- if (is_string($v) && preg_match("/^\S+@\S+\.\S+$/", $v)) {
1795
- $sender_email = $v;
 
 
 
 
 
1796
  }
1797
 
1798
- // Looing email address in arrays
1799
- if (is_array($v)) {
1800
- foreach ($v as $v2) {
1801
- if ($sender_email) {
1802
- continue;
1803
- }
1804
-
1805
- if (is_string($v2) && preg_match("/^\S+@\S+\.\S+$/", $v2)) {
1806
- $sender_email = $v2;
 
 
 
 
 
 
1807
  }
1808
  }
1809
  }
1810
- }
1811
- if ($sender_nickname === null && ct_get_data_from_submit($k, 'name')) {
1812
- $sender_nickname = $v;
1813
- }
1814
- if ($message === '' && ct_get_data_from_submit($k, 'message')) {
1815
- $message = $v;
1816
- }
1817
- if ($subject === '' && ct_get_data_from_submit($k, 'subject')) {
1818
- $subject = $v;
1819
- }
1820
-
1821
- if (!$contact_form && preg_match("/(contact|form|feedback|subscribe|action)/", $k) && !preg_match("/^ct_checkjs/", $k)) {
1822
- $contact_form = true;
1823
  }
1824
  }
1825
 
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.11
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-411';
14
  $ct_plugin_name = 'Anti-spam by CleanTalk';
15
  $ct_checkjs_frm = 'ct_checkjs_frm';
16
  $ct_checkjs_register_form = 'ct_checkjs_register_form';
435
  $result = 0;
436
  }
437
  } else {
438
+ @setcookie($cookie_label, $secret_hash, 0, '/');
439
 
440
  if ($test) {
441
  $result = 0;
575
  <script type="text/javascript">
576
  var ct_input_name = \'%s\';
577
  var ct_input_value = document.getElementById(ct_input_name).value;
578
+ setTimeout(function(){ document.getElementById(ct_input_name).value = document.getElementById(ct_input_name).value.replace(ct_input_value, %s); }, 1000);
579
  </script>
580
  ';
581
  $html = sprintf($html, $field_id, $field_name, $ct_checkjs_def, $field_id, $ct_input_challenge);
582
  };
583
 
 
 
584
  // Simplify JS code
585
  // and fixing issue with wpautop()
586
  $html = str_replace(array("\n","\r"),'', $html);
1785
  $sender_nickname = null;
1786
  $subject = '';
1787
  $message = '';
1788
+ $contact_form = true;
1789
 
1790
+ $skip_params = array(
1791
+ 'ipn_track_id', // PayPal IPN #
1792
+ 'txn_type', // PayPal transaction type
1793
+ );
1794
+ if (is_array($_POST)) {
1795
+ foreach ($_POST as $k => $v) {
1796
+ if (in_array($k, $skip_params) || preg_match("/^ct_checkjs/", $k)) {
1797
+ $contact_form = false;
1798
+ break;
1799
  }
1800
 
1801
+ if ($sender_email === null && isset($v)) {
1802
+ if (is_string($v) && preg_match("/^\S+@\S+\.\S+$/", $v)) {
1803
+ $sender_email = $v;
1804
+ }
1805
+
1806
+ // Looing email address in arrays
1807
+ if (is_array($v)) {
1808
+ foreach ($v as $v2) {
1809
+ if ($sender_email) {
1810
+ continue;
1811
+ }
1812
+
1813
+ if (is_string($v2) && preg_match("/^\S+@\S+\.\S+$/", $v2)) {
1814
+ $sender_email = $v2;
1815
+ }
1816
  }
1817
  }
1818
  }
1819
+ if ($sender_nickname === null && ct_get_data_from_submit($k, 'name')) {
1820
+ $sender_nickname = $v;
1821
+ }
1822
+ if ($message === '' && ct_get_data_from_submit($k, 'message')) {
1823
+ $message = $v;
1824
+ }
1825
+ if ($subject === '' && ct_get_data_from_submit($k, 'subject')) {
1826
+ $subject = $v;
1827
+ }
 
 
 
 
1828
  }
1829
  }
1830
 
i18n/cleantalk-fr_FR.mo ADDED
Binary file
readme.txt CHANGED
@@ -1,22 +1,24 @@
1
  === Anti-spam by CleanTalk (no CAPTCHA) ===
2
  Contributors: znaeff, shagimuratov
3
- Tags: Akismet, anti spam, antispam, bbpress spam, buddypress spam, capcha, captcha antispam, cf7 spam, comments spam, contact form spam, fast secure contact form spam, form, Formidable spam, jetpack spam, landing pages, math, registration spam, s2member, signup, signup spam, spam, spammers, spammy, WooCommerce spam, wordpress spam
4
  Requires at least: 3.0
5
  Tested up to: 4.1
6
- Stable tag: 4.10
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
- No spam comments, no spam registrations, no spam emails, no captcha and no spam bots. Cloud, CAPTCHA less, premium anti-spam for WordPress.
11
 
12
  == Description ==
13
  No CAPTCHA, no questions, no counting animals, no puzzles, no math and no spam bots.
14
 
15
  = Anti spam features =
16
  1. Stops spam comments.
17
- 1. Stops spam signups.
18
- 1. Stops spam contacts emails.
19
- 1. Stops spam trackbacks.
 
 
20
 
21
  = Spam protection =
22
  * WordPress, JetPack comments.
@@ -24,6 +26,7 @@ No CAPTCHA, no questions, no counting animals, no puzzles, no math and no spam b
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
 
28
  = Cloud antispam for WordPress. CAPTCHA less, no spam comments, no spam registrations, no spam contact emails, no spam trackbacks =
29
  Spam is one of the most irritating factors. Spam become every year more and conventional anti spam can no longer handle all the spam bots. CleanTalk prevents spam and automatically blocks it. You'll be surprised of effective protection against spam.
@@ -156,6 +159,12 @@ WordPress 3.0 at least. PHP 4, 5 with CURL or file_get_contents() function and e
156
  1. Setup Android/iOS app to have push notices when new legitiamte comments/registrations or contactcs appears on the website.
157
 
158
  == Changelog ==
 
 
 
 
 
 
159
  = 4.10 2014-12-10 =
160
  * Improved anti spam protection for custom contact/registration/subscribe forms.
161
  * Option 'Custom contact forms' enabled by default for new setups.
@@ -447,6 +456,9 @@ WordPress 3.0 at least. PHP 4, 5 with CURL or file_get_contents() function and e
447
  * First version
448
 
449
  == Upgrade Notice ==
 
 
 
450
  = 4.10 2014-12-10 =
451
  Minor improvements for custom contact/registration/subscribe forms.
452
 
1
  === Anti-spam by CleanTalk (no CAPTCHA) ===
2
  Contributors: znaeff, shagimuratov
3
+ Tags: Akismet, anti spam, antispam, bbpress spam, buddypress spam, capcha, captcha antispam, cf7 spam, comments spam, contact form spam, fast secure contact form spam, form, Formidable spam, jetpack spam, landing pages, math, registration spam, s2member, signup spam, spam, spammers, spammy, WooCommerce spam, wordpress spam, booking spam, order spam
4
  Requires at least: 3.0
5
  Tested up to: 4.1
6
+ Stable tag: 4.11
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 plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms.
11
 
12
  == Description ==
13
  No CAPTCHA, no questions, no counting animals, no puzzles, no math and no spam bots.
14
 
15
  = Anti spam features =
16
  1. Stops spam comments.
17
+ 1. Stops spam registrations.
18
+ 1. Stops spam contact emails.
19
+ 1. Stops spam orders.
20
+ 1. Stops spam bookings.
21
+ 1. Stops spam subscriptions.
22
 
23
  = Spam protection =
24
  * WordPress, JetPack comments.
26
  * Formidable forms, Contact form 7, JetPack Contact form, Fast Secure Contact form, Ninja forms, Landing pages and any themes/custom contact form.
27
  * WooCommerce review form.
28
  * WordPress Landing Pages.
29
+ * Any WordPress form (with enabled anti-spam option 'Custom contact forms').
30
 
31
  = Cloud antispam for WordPress. CAPTCHA less, no spam comments, no spam registrations, no spam contact emails, no spam trackbacks =
32
  Spam is one of the most irritating factors. Spam become every year more and conventional anti spam can no longer handle all the spam bots. CleanTalk prevents spam and automatically blocks it. You'll be surprised of effective protection against spam.
159
  1. Setup Android/iOS app to have push notices when new legitiamte comments/registrations or contactcs appears on the website.
160
 
161
  == Changelog ==
162
+ = 4.11 2014-12-22 =
163
+ * Improved anti spam protection for custom contact/registration/subscribe forms.
164
+ * Improved anti spam protection for comments.
165
+ * Accelerated plugin speed for comments, regirstrations and contacts.
166
+ * Added translation to French.
167
+
168
  = 4.10 2014-12-10 =
169
  * Improved anti spam protection for custom contact/registration/subscribe forms.
170
  * Option 'Custom contact forms' enabled by default for new setups.
456
  * First version
457
 
458
  == Upgrade Notice ==
459
+ = 4.11 2014-12-22 =
460
+ Major changes in spam protection algorithms.
461
+
462
  = 4.10 2014-12-10 =
463
  Minor improvements for custom contact/registration/subscribe forms.
464