Spam protection, AntiSpam, FireWall by CleanTalk - Version 5.152.1

Version Description

Jan 29 2020 = * Fix: Errors in IP detection.

Download this release

Release Info

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

Code changes from version 5.152 to 5.152.1

Files changed (3) hide show
  1. cleantalk.php +1 -1
  2. lib/Cleantalk/Common/Helper.php +5 -5
  3. readme.txt +4 -1
cleantalk.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Anti-Spam by CleanTalk
4
  Plugin URI: https://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.
6
- Version: 5.152
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: https://cleantalk.org
9
  Text Domain: cleantalk-spam-protect
3
  Plugin Name: Anti-Spam by CleanTalk
4
  Plugin URI: https://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.
6
+ Version: 5.152.1
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: https://cleantalk.org
9
  Text Domain: cleantalk-spam-protect
lib/Cleantalk/Common/Helper.php CHANGED
@@ -296,11 +296,7 @@ class Helper
296
  */
297
  static public function ip__mask_match($ip, $cidr, $ip_type = 'v4', $xtet_count = 0)
298
  {
299
- if( ! self::ip__validate( $ip ) || ! self::cidr__validate( $cidr ) ){
300
- return false;
301
- }
302
-
303
- if(is_array($cidr)){
304
  foreach($cidr as $curr_mask){
305
  if(self::ip__mask_match($ip, $curr_mask, $ip_type)){
306
  return true;
@@ -309,6 +305,10 @@ class Helper
309
  unset($curr_mask);
310
  return false;
311
  }
 
 
 
 
312
 
313
  $xtet_base = ($ip_type == 'v4') ? 8 : 16;
314
 
296
  */
297
  static public function ip__mask_match($ip, $cidr, $ip_type = 'v4', $xtet_count = 0)
298
  {
299
+ if(is_array($cidr)){
 
 
 
 
300
  foreach($cidr as $curr_mask){
301
  if(self::ip__mask_match($ip, $curr_mask, $ip_type)){
302
  return true;
305
  unset($curr_mask);
306
  return false;
307
  }
308
+
309
+ if( ! self::ip__validate( $ip ) || ! self::cidr__validate( $cidr ) ){
310
+ return false;
311
+ }
312
 
313
  $xtet_base = ($ip_type == 'v4') ? 8 : 16;
314
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: spam, antispam, anti-spam, comments, firewall
4
  Requires at least: 3.0
5
  Tested up to: 5.6
6
  Requires PHP: 5.4
7
- Stable tag: 5.152
8
  License: GPLv2
9
 
10
  Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
@@ -580,6 +580,9 @@ If your website has forms that send data to external sources, you can enable opt
580
 
581
  == Changelog ==
582
 
 
 
 
583
  = 5.152 Jan 29 2020 =
584
  * Fix: Using server protocol for AC checking.
585
  * Fix: Prevent caching db queries for SFW.
4
  Requires at least: 3.0
5
  Tested up to: 5.6
6
  Requires PHP: 5.4
7
+ Stable tag: 5.152.1
8
  License: GPLv2
9
 
10
  Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
580
 
581
  == Changelog ==
582
 
583
+ = 5.152.1 Jan 29 2020 =
584
+ * Fix: Errors in IP detection.
585
+
586
  = 5.152 Jan 29 2020 =
587
  * Fix: Using server protocol for AC checking.
588
  * Fix: Prevent caching db queries for SFW.