WPBruiser {no- Captcha anti-Spam} - Version 3.1.11

Version Description

  • Fixed the PHP notice issue reported by @devonostendorf[https://wordpress.org/support/topic/php-notice-wpdbprepare-was-called-incorrectly-generated-in-wp-core-v4-8-3/]
Download this release

Release Info

Developer mihche
Plugin Icon 128x128 WPBruiser {no- Captcha anti-Spam}
Version 3.1.11
Comparing to
See all releases

Code changes from version 3.1.10 to 3.1.11

engine/db-access/GdbcDbAccessController.php CHANGED
@@ -328,7 +328,7 @@ final class GdbcDbAccessController
328
  $averageStatement = ($calculateAverage) ? 'FORMAT( (MAX(CreatedDate) - MIN(CreatedDate)) / (Count(1) - 1) , 2) As TimeAverage,' : '';
329
 
330
  $sqlQuery = "SELECT Count(1) AS Hits, $averageStatement ClientIp FROM " . self::getAttemptsTableName();
331
- $sqlQuery .= ' WHERE CreatedDate > %d ' . ( GoodByeCaptcha::isNetworkActivated() ? 'AND SiteId = %d' : '');
332
  $sqlQuery .= ' AND ( ';
333
 
334
  foreach(GoodByeCaptchaUtils::getAllPossibleLoginAttemptEntities() as $gdbcAttempt){
@@ -337,13 +337,13 @@ final class GdbcDbAccessController
337
 
338
  $sqlQuery = substr($sqlQuery, 0, -4) . ' ) GROUP BY ClientIp';
339
 
340
- $arrParams = array(MchGdbcHttpRequest::getServerRequestTime() - $numberOfSecondsAgo - 1);
341
-
342
  $arrParams = array(
343
  MchGdbcHttpRequest::getServerRequestTime() - $numberOfSecondsAgo - 2,
344
- get_current_blog_id()
345
  );
346
 
 
 
 
347
 
348
  return self::executePreparedQuery($wpdb->prepare($sqlQuery, $arrParams));
349
 
328
  $averageStatement = ($calculateAverage) ? 'FORMAT( (MAX(CreatedDate) - MIN(CreatedDate)) / (Count(1) - 1) , 2) As TimeAverage,' : '';
329
 
330
  $sqlQuery = "SELECT Count(1) AS Hits, $averageStatement ClientIp FROM " . self::getAttemptsTableName();
331
+ $sqlQuery .= ' WHERE CreatedDate > %d ' . ( GoodByeCaptcha::isNetworkActivated() ? ' AND SiteId = %d' : '');
332
  $sqlQuery .= ' AND ( ';
333
 
334
  foreach(GoodByeCaptchaUtils::getAllPossibleLoginAttemptEntities() as $gdbcAttempt){
337
 
338
  $sqlQuery = substr($sqlQuery, 0, -4) . ' ) GROUP BY ClientIp';
339
 
 
 
340
  $arrParams = array(
341
  MchGdbcHttpRequest::getServerRequestTime() - $numberOfSecondsAgo - 2,
 
342
  );
343
 
344
+ if(GoodByeCaptcha::isNetworkActivated()){
345
+ $arrParams[] = get_current_blog_id();
346
+ }
347
 
348
  return self::executePreparedQuery($wpdb->prepare($sqlQuery, $arrParams));
349
 
goodbye-captcha.php CHANGED
@@ -10,7 +10,7 @@
10
  * Plugin Name: WPBruiser
11
  * Plugin URI: http://www.wpbruiser.com
12
  * Description: An extremely powerful anti-spam plugin that blocks spambots without annoying captcha images.
13
- * Version: 3.1.10
14
  * Author: Mihai Chelaru
15
  * Author URI: http://www.wpbruiser.com
16
  * Text Domain: wp-bruiser
@@ -23,7 +23,7 @@ if(!class_exists('GoodByeCaptcha', false))
23
  {
24
  class GoodByeCaptcha
25
  {
26
- CONST PLUGIN_VERSION = '3.1.10';
27
  CONST PLUGIN_SLUG = 'wp-bruiser';
28
  CONST PLUGIN_NAME = 'WPBruiser';
29
  CONST PLUGIN_SITE_URL = 'http://www.wpbruiser.com';
10
  * Plugin Name: WPBruiser
11
  * Plugin URI: http://www.wpbruiser.com
12
  * Description: An extremely powerful anti-spam plugin that blocks spambots without annoying captcha images.
13
+ * Version: 3.1.11
14
  * Author: Mihai Chelaru
15
  * Author URI: http://www.wpbruiser.com
16
  * Text Domain: wp-bruiser
23
  {
24
  class GoodByeCaptcha
25
  {
26
+ CONST PLUGIN_VERSION = '3.1.11';
27
  CONST PLUGIN_SLUG = 'wp-bruiser';
28
  CONST PLUGIN_NAME = 'WPBruiser';
29
  CONST PLUGIN_SITE_URL = 'http://www.wpbruiser.com';
includes/vendor/MchHttp/MchGdbcTrustedIPRanges.php CHANGED
@@ -42,7 +42,7 @@ final class MchGdbcTrustedIPRanges
42
 
43
  return ( $ipVersion === MchGdbcIPUtils::IP_VERSION_4 )
44
  ?
45
- self::isIPInRanges($ipAddress, $ipVersion, array(220200960=>220332031,221659008=>221659071,222034432=>222034495,225561344=>225561599,226281216=>226281471,233063680=>233063935,583269376=>583269631,585240064=>585240319,585671632=>585671639,597592064=>597592319,597835712=>597835775,598196096=>598196159,873430912=>873430975,875429888=>875446271,875872128=>875872191,876117760=>876117887,876215808=>876216063,876790400=>876790463,877590400=>877590463,877920256=>878051327,885489600=>885489663,886372352=>886372415,886882048=>886882111,886996992=>887029759,917897216=>917962751,918552576=>918618111,921042944=>921108479,921304960=>921305023,921665536=>921690111,921731072=>921747455,3438715904=>3438717951,3438718464=>3438723071,3455827968=>3455836159,3455842560=>3455844095,3632865280=>3632873471,))
46
  :
47
  self::isIPInRanges($ipAddress, $ipVersion, array());
48
 
42
 
43
  return ( $ipVersion === MchGdbcIPUtils::IP_VERSION_4 )
44
  ?
45
+ self::isIPInRanges($ipAddress, $ipVersion, array(220200960=>220332031,221659008=>221659071,222034432=>222034495,225561344=>225561599,226281216=>226281471,233063680=>233063935,583269376=>583269631,585240064=>585240319,585671632=>585671639,597592064=>597592319,597835712=>597835775,598196096=>598196159,873430912=>873430975,875429888=>875446271,875531008=>875531263,875872128=>875872191,876117760=>876117887,876215808=>876216063,876790400=>876790463,877590400=>877590463,877920256=>878051327,885489600=>885489663,886372352=>886372415,886882048=>886882111,886996992=>887029759,917897216=>917962751,918552576=>918618111,921042944=>921108479,921304960=>921305023,921665536=>921690111,921731072=>921747455,3438715904=>3438717951,3438718464=>3438723071,3455827968=>3455836159,3455842560=>3455844095,3632865280=>3632873471,))
46
  :
47
  self::isIPInRanges($ipAddress, $ipVersion, array());
48
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: mihche
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XVC3TSGEJQP2U
4
  Tags: captcha, antispam, anti-spam, spam, mailpoet, antispambot, brute force, comment spam, jetpack contact form, contact form 7, ninja forms, formidable forms, wp bruiser
5
  Requires at least: 3.5
6
- Tested up to: 4.8
7
- Stable tag: 3.1.10
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -223,6 +223,10 @@ Studies shown that visual CAPTCHAs take around 5-10 seconds to complete and audi
223
  == Changelog ==
224
  * Added integration with [Ultra Community](https://wordpress.org/plugins/ultra-community/) Membership plugin
225
 
 
 
 
 
226
  = 3.1.9 =
227
  * Added integration with [MailChimp Top Bar](https://wordpress.org/plugins/mailchimp-top-bar/)
228
 
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XVC3TSGEJQP2U
4
  Tags: captcha, antispam, anti-spam, spam, mailpoet, antispambot, brute force, comment spam, jetpack contact form, contact form 7, ninja forms, formidable forms, wp bruiser
5
  Requires at least: 3.5
6
+ Tested up to: 4.9
7
+ Stable tag: 3.1.11
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
223
  == Changelog ==
224
  * Added integration with [Ultra Community](https://wordpress.org/plugins/ultra-community/) Membership plugin
225
 
226
+ = 3.1.11 =
227
+ * Fixed the PHP notice issue reported by @devonostendorf[https://wordpress.org/support/topic/php-notice-wpdbprepare-was-called-incorrectly-generated-in-wp-core-v4-8-3/]
228
+
229
+
230
  = 3.1.9 =
231
  * Added integration with [MailChimp Top Bar](https://wordpress.org/plugins/mailchimp-top-bar/)
232