[Xfce4-commits] <forum:master> Update to bad behaviour 2.1.13.

Nick Schermer noreply at xfce.org
Fri Jun 3 20:24:02 CEST 2011


Updating branch refs/heads/master
         to 105fa351c0569665f68ed29f5d098dd89b80d58a (commit)
       from fc301825f4aae97ea668c7c3204e48fffbde0f0c (commit)

commit 105fa351c0569665f68ed29f5d098dd89b80d58a
Author: Nick Schermer <nick at xfce.org>
Date:   Fri Jun 3 20:21:55 2011 +0200

    Update to bad behaviour 2.1.13.

 include/bad-behavior/core.inc.php         |    7 +++++--
 include/bad-behavior/searchengine.inc.php |    2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/include/bad-behavior/core.inc.php b/include/bad-behavior/core.inc.php
index 43205d1..3fdaf06 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.1.10");
+define('BB2_VERSION', "2.1.13");
 
 // Bad Behavior entry point is bb2_start()
 // If you're reading this, you are probably lost.
@@ -141,18 +141,21 @@ function bb2_screen($settings, $package)
 				if ($r == 1) return false;	# whitelisted
 				return $r;
 			}
-		} elseif (stripos($ua, "Googlebot") !== FALSE || stripos($ua, "Mediapartners-Google") !== FALSE || stripos($ua, "Google Wireless") !== FALSE) {
+			return false;
+		} elseif (stripos($ua, "Googlebot") !== FALSE || stripos($ua, "Mediapartners-Google") !== FALSE) {
 			require_once(BB2_CORE . "/searchengine.inc.php");
 			if ($r = bb2_google($package)) {
 				if ($r == 1) return false;	# whitelisted
 				return $r;
 			}
+			return false;
 		} elseif (stripos($ua, "Yahoo! Slurp") !== FALSE || stripos($ua, "Yahoo! SearchMonkey") !== FALSE) {
 			require_once(BB2_CORE . "/searchengine.inc.php");
 			if ($r = bb2_yahoo($package)) {
 				if ($r == 1) return false;	# whitelisted
 				return $r;
 			}
+			return false;
 		}
 		// MSIE checks
 		if (stripos($ua, "; MSIE") !== FALSE) {
diff --git a/include/bad-behavior/searchengine.inc.php b/include/bad-behavior/searchengine.inc.php
index 9013dd7..8a65b2b 100644
--- a/include/bad-behavior/searchengine.inc.php
+++ b/include/bad-behavior/searchengine.inc.php
@@ -6,7 +6,7 @@ require_once(BB2_CORE . "/roundtripdns.inc.php");
 
 function bb2_google($package)
 {
-	if (match_cidr($package['ip'], array("66.249.64.0/19", "64.233.160.0/19", "72.14.192.0/18")) === FALSE) {
+	if (match_cidr($package['ip'], array("66.249.64.0/19", "64.233.160.0/19", "72.14.192.0/18", "203.208.32.0/19", "74.125.0.0/16", "216.239.32.0/19")) === FALSE) {
 		return "f1182195";
 	}
 #	Disabled due to http://bugs.php.net/bug.php?id=53092



More information about the Xfce4-commits mailing list