[Xfce4-commits] <forum:master> Update bb to 2.2.15.

Nick Schermer noreply at xfce.org
Sun Feb 9 20:10:02 CET 2014


Updating branch refs/heads/master
         to f4d83cd2fda80e52102342694f51c57c144267ea (commit)
       from 1c9897a1fc53e08139dd3d6d91b5d8d8825b4b8b (commit)

commit f4d83cd2fda80e52102342694f51c57c144267ea
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Feb 9 20:09:21 2014 +0100

    Update bb to 2.2.15.

 include/bad-behavior/blacklist.inc.php |    1 +
 include/bad-behavior/core.inc.php      |    2 +-
 include/bad-behavior/post.inc.php      |    2 +-
 include/bad-behavior/screener.inc.php  |    7 +++++--
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/include/bad-behavior/blacklist.inc.php b/include/bad-behavior/blacklist.inc.php
index 2a139c3..f0b358b 100644
--- a/include/bad-behavior/blacklist.inc.php
+++ b/include/bad-behavior/blacklist.inc.php
@@ -93,6 +93,7 @@ function bb2_blacklist($package) {
 		"Murzillo compatible",	// comment spam bot
 		".NET CLR 1)",		// free poker, etc.
 		".NET CLR1",		// spam harvester
+		"Netsparker",		// vulnerability scanner
 		"Nikto/",		// vulnerability scanner
 		"Perman Surfer",	// old and very broken harvester
 		"POE-Component-Client",	// free poker, etc.
diff --git a/include/bad-behavior/core.inc.php b/include/bad-behavior/core.inc.php
index 805e11b..c826acf 100644
--- a/include/bad-behavior/core.inc.php
+++ b/include/bad-behavior/core.inc.php
@@ -1,5 +1,5 @@
 <?php if (!defined('BB2_CWD')) die("I said no cheating!");
-define('BB2_VERSION', "2.2.14");
+define('BB2_VERSION', "2.2.15");
 
 // Bad Behavior entry point is bb2_start()
 // If you're reading this, you are probably lost.
diff --git a/include/bad-behavior/post.inc.php b/include/bad-behavior/post.inc.php
index 88c99ba..00739d0 100644
--- a/include/bad-behavior/post.inc.php
+++ b/include/bad-behavior/post.inc.php
@@ -64,7 +64,7 @@ function bb2_post($settings, $package)
 	}
 
 	// Screen by cookie/JavaScript form add
-	if (isset($_COOKIE[BB2_COOKIE])) {
+	if (isset($_COOKIE[BB2_COOKIE]) && !$settings['eu_cookie']) {
 		$screener1 = explode(" ", $_COOKIE[BB2_COOKIE]);
 	} else {
 		$screener1 = array(0);
diff --git a/include/bad-behavior/screener.inc.php b/include/bad-behavior/screener.inc.php
index b50f02f..b34c03d 100644
--- a/include/bad-behavior/screener.inc.php
+++ b/include/bad-behavior/screener.inc.php
@@ -4,8 +4,11 @@
 
 function bb2_screener_cookie($settings, $package, $cookie_name, $cookie_value)
 {
-	// FIXME: Set the real cookie
-	if (!$settings['eu_cookie']) {
+	if ($settings['eu_cookie']) {
+		// Delete existing cookie, if any
+		setcookie($cookie_name, $cookie_value, 1, bb2_relative_path());
+	} else {
+		// Set session cookie
 		setcookie($cookie_name, $cookie_value, 0, bb2_relative_path());
 	}
 }


More information about the Xfce4-commits mailing list