[geeklog-cvs] bad_behavior2: Upgraded to Bad Behavior 2.0.26
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun Feb 1 03:18:25 EST 2009
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/3cf973786d8b
changeset: 8:3cf973786d8b
user: Dirk Haun <dirk at haun-online.de>
date: Sun Feb 01 09:17:55 2009 +0100
description:
Upgraded to Bad Behavior 2.0.26
diffstat:
7 files changed, 23 insertions(+), 11 deletions(-)
INSTALL.txt | 10 +++++-----
public_html/README.txt | 4 ++--
public_html/bad-behavior-wordpress-admin.php | 2 +-
public_html/bad-behavior-wordpress.php | 2 +-
public_html/bad-behavior/blackhole.inc.php | 11 +++++++++++
public_html/bad-behavior/msie.inc.php | 3 ++-
public_html/bad-behavior/version.inc.php | 2 +-
diffs (127 lines):
diff -r 52aaf58fe42f -r 3cf973786d8b INSTALL.txt
--- a/INSTALL.txt Sun Feb 01 09:16:11 2009 +0100
+++ b/INSTALL.txt Sun Feb 01 09:17:55 2009 +0100
@@ -1,4 +1,4 @@
-Bad Behavior2 Plugin v2.0.25 for Geeklog v1.4.1 and later
+Bad Behavior2 Plugin v2.0.26 for Geeklog v1.4.1 and later
- Bad Behavior 2 is Copyright (c) 2005-2008 Michael Hampton.
All rights reserved.
Original Geeklog Plugin by Dirk Haun
@@ -18,7 +18,7 @@
With one exception (see step 5), this plugin installs like any other Geeklog
plugin:
-1) Unpack bad_behavior2_2.0.25-1.4.1.tar.gz
+1) Unpack bad_behavior2_2.0.26-1.4.1.tar.gz
2) Upload the contents of the public_html directory into
/path/to/geeklog/public_html/bad_behavior2
3) Upload the contents of the admin directory into
@@ -47,7 +47,7 @@
UPGRADING
If you are upgrading from v1.2.4-1 you must first uninstall the existing
-plugin before you install v2.0.25.
+plugin before you install v2.0.26.
- Perform a standard plugin uninstall - Plugins -> Bad Behavior - Delete
- Do not forget to remove the Bad Behavior 1 lib-common.php entry
@@ -132,8 +132,8 @@
Copyright
-Bad Behavior is (c) 2005-2008 by Michael Hampton and released under the GPL
-The Geeklog plugin is (c) 2005-2008 Dirk Haun and also released under the GPL
+Bad Behavior is (c) 2005-2009 by Michael Hampton and released under the GPL
+The Geeklog plugin is (c) 2005-2009 Dirk Haun and also released under the GPL
Original upgrade to Bad Behavior v2.0.x by Mark Evans - GPL'ed of course...
Please see the included file COPYING (in public_html) for license details.
diff -r 52aaf58fe42f -r 3cf973786d8b public_html/README.txt
--- a/public_html/README.txt Sun Feb 01 09:16:11 2009 +0100
+++ b/public_html/README.txt Sun Feb 01 09:17:55 2009 +0100
@@ -3,8 +3,8 @@
Contributors: error, MarkJaquith, Firas, skeltoac
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=error%40ioerror%2eus&item_name=Bad%20Behavior%20%28From%20WordPress%20Page%29&no_shipping=1&cn=Comments%20about%20Bad%20Behavior&tax=0¤cy_code=USD&bn=PP%2dDonationsBF&charset=UTF%2d8
Requires at least: 1.2
-Tested up to: 2.7
-Stable tag: 2.0.25
+Tested up to: 2.8
+Stable tag: 2.0.26
Welcome to a whole new way of keeping your blog, forum, guestbook, wiki or
content management system free of link spam. Bad Behavior is a PHP-based
diff -r 52aaf58fe42f -r 3cf973786d8b public_html/bad-behavior-wordpress-admin.php
--- a/public_html/bad-behavior-wordpress-admin.php Sun Feb 01 09:16:11 2009 +0100
+++ b/public_html/bad-behavior-wordpress-admin.php Sun Feb 01 09:17:55 2009 +0100
@@ -167,7 +167,7 @@
echo "</td>\n";
$headers = str_replace("\n", "<br/>\n", htmlspecialchars($result['http_headers']));
if (@strpos($headers, $result['user_agent']) !== FALSE) $headers = substr_replace($headers, "<a href=\"" . add_query_arg("user_agent", rawurlencode($result["user_agent"]), remove_query_arg("paged", $request_uri)) . "\">" . $result['user_agent'] . "</a>", strpos($headers, $result['user_agent']), strlen($result['user_agent']));
- if (strpos($headers, $result['request_method']) !== FALSE) $headers = substr_replace($headers, "<a href=\"" . add_query_arg("request_method", rawurlencode($result["request_method"]), remove_query_arg("paged", $request_uri)) . "\">" . $result['request_method'] . "</a>", strpos($headers, $result['request_method']), strlen($result['request_method']));
+ if (@strpos($headers, $result['request_method']) !== FALSE) $headers = substr_replace($headers, "<a href=\"" . add_query_arg("request_method", rawurlencode($result["request_method"]), remove_query_arg("paged", $request_uri)) . "\">" . $result['request_method'] . "</a>", strpos($headers, $result['request_method']), strlen($result['request_method']));
echo "<td>$headers</td>\n";
echo "<td>" . str_replace("\n", "<br/>\n", htmlspecialchars($result["request_entity"])) . "</td>\n";
echo "</tr>\n";
diff -r 52aaf58fe42f -r 3cf973786d8b public_html/bad-behavior-wordpress.php
--- a/public_html/bad-behavior-wordpress.php Sun Feb 01 09:16:11 2009 +0100
+++ b/public_html/bad-behavior-wordpress.php Sun Feb 01 09:17:55 2009 +0100
@@ -1,7 +1,7 @@
<?php
/*
Plugin Name: Bad Behavior
-Version: 2.0.25
+Version: 2.0.26
Description: Deny automated spambots access to your PHP-based Web site.
Plugin URI: http://www.bad-behavior.ioerror.us/
Author: Michael Hampton
diff -r 52aaf58fe42f -r 3cf973786d8b public_html/bad-behavior/blackhole.inc.php
--- a/public_html/bad-behavior/blackhole.inc.php Sun Feb 01 09:16:11 2009 +0100
+++ b/public_html/bad-behavior/blackhole.inc.php Sun Feb 01 09:17:55 2009 +0100
@@ -1,8 +1,16 @@
<?php if (!defined('BB2_CORE')) die('I said no cheating!');
+
+// Quick and dirty check for an IPv6 address
+function is_ipv6($address) {
+ return (strpos($address, ":")) ? TRUE : FALSE;
+}
// Look up address on various blackhole lists.
// These cannot be used for GET requests under any circumstances!
function bb2_blackhole($package) {
+ // Can't use IPv6 addresses yet
+ if (is_ipv6($package['REMOTE_ADDR'])) return;
+
// Only conservative lists
$bb2_blackhole_lists = array(
"sbl-xbl.spamhaus.org", // All around nasties
@@ -36,6 +44,9 @@
}
function bb2_httpbl($settings, $package) {
+ // Can't use IPv6 addresses yet
+ if (is_ipv6($package['REMOTE_ADDR'])) return;
+
if (!$settings['httpbl_key']) return false;
$find = implode('.', array_reverse(explode('.', $package['ip'])));
diff -r 52aaf58fe42f -r 3cf973786d8b public_html/bad-behavior/msie.inc.php
--- a/public_html/bad-behavior/msie.inc.php Sun Feb 01 09:16:11 2009 +0100
+++ b/public_html/bad-behavior/msie.inc.php Sun Feb 01 09:17:55 2009 +0100
@@ -15,7 +15,8 @@
// MSIE does NOT send Connection: TE but Akamai does
// Bypass this test when Akamai detected
- if (!array_key_exists('Akamai-Origin-Hop', $package['headers_mixed']) && @preg_match('/\bTE\b/i', $package['headers_mixed']['Connection'])) {
+ // The latest version of IE for Windows CE also uses Connection: TE
+ if (!array_key_exists('Akamai-Origin-Hop', $package['headers_mixed']) && strpos($package['headers_mixed']['User-Agent'], "IEMobile") === FALSE && @preg_match('/\bTE\b/i', $package['headers_mixed']['Connection'])) {
return "2b90f772";
}
diff -r 52aaf58fe42f -r 3cf973786d8b public_html/bad-behavior/version.inc.php
--- a/public_html/bad-behavior/version.inc.php Sun Feb 01 09:16:11 2009 +0100
+++ b/public_html/bad-behavior/version.inc.php Sun Feb 01 09:17:55 2009 +0100
@@ -1,3 +1,3 @@
<?php if (!defined('BB2_CWD')) die("I said no cheating!");
-define('BB2_VERSION', "2.0.25");
+define('BB2_VERSION', "2.0.26");
?>
More information about the geeklog-cvs
mailing list