Version Description
Download this release
Release Info
Developer | error |
Plugin | Bad Behavior |
Version | 2.1.14 |
Comparing to | |
See all releases |
Code changes from version 2.1.13 to 2.1.14
- README.txt +10 -8
- bad-behavior-wordpress.php +2 -2
- bad-behavior/common_tests.inc.php +1 -1
- bad-behavior/core.inc.php +2 -2
README.txt
CHANGED
@@ -3,8 +3,8 @@ Tags: comment,trackback,referrer,spam,robot,antispam
|
|
3 |
Contributors: error, markjaquith, skeltoac
|
4 |
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
|
5 |
Requires at least: 2.7
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 2.0.
|
8 |
|
9 |
Bad Behavior prevents spammers from ever delivering their junk, and in many
|
10 |
cases, from ever reading your site in the first place.
|
@@ -15,7 +15,7 @@ Welcome to a whole new way of keeping your blog, forum, guestbook, wiki or
|
|
15 |
content management system free of link spam. Bad Behavior is a PHP-based
|
16 |
solution for blocking link spam and the robots which deliver it.
|
17 |
|
18 |
-
Thousands of sites
|
19 |
Department of Education, and many more, trust Bad Behavior to help reduce
|
20 |
incoming link spam and malicious activity.
|
21 |
|
@@ -53,13 +53,15 @@ any later version.
|
|
53 |
|
54 |
== Installation ==
|
55 |
|
|
|
|
|
|
|
|
|
56 |
*Warning*: If you are upgrading from a 1.x.x version of Bad Behavior,
|
57 |
you must remove it from your system entirely, and delete all of its
|
58 |
-
database tables, before installing Bad Behavior 2.0.x. If you are
|
59 |
-
from version 2.0.18 or prior, you must delete all of its files
|
60 |
-
upgrading, but do not need to delete the database tables.
|
61 |
-
to remove a 2.0.19 or later version of Bad Behavior before upgrading to this
|
62 |
-
release.
|
63 |
|
64 |
Bad Behavior has been designed to install on each host software in the
|
65 |
manner most appropriate to each platform. It's usually sufficient to
|
3 |
Contributors: error, markjaquith, skeltoac
|
4 |
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
|
5 |
Requires at least: 2.7
|
6 |
+
Tested up to: 3.2.1
|
7 |
+
Stable tag: 2.0.44
|
8 |
|
9 |
Bad Behavior prevents spammers from ever delivering their junk, and in many
|
10 |
cases, from ever reading your site in the first place.
|
15 |
content management system free of link spam. Bad Behavior is a PHP-based
|
16 |
solution for blocking link spam and the robots which deliver it.
|
17 |
|
18 |
+
Thousands of sites large and small, like SourceForge, GNOME, the U.S.
|
19 |
Department of Education, and many more, trust Bad Behavior to help reduce
|
20 |
incoming link spam and malicious activity.
|
21 |
|
53 |
|
54 |
== Installation ==
|
55 |
|
56 |
+
*Warning*: If you are upgrading from a 2.0.x release of Bad Behavior, it is
|
57 |
+
recommended that you delete the old version from your system before
|
58 |
+
installing the 2.2.x release, or obsolete files may be left lying around.
|
59 |
+
|
60 |
*Warning*: If you are upgrading from a 1.x.x version of Bad Behavior,
|
61 |
you must remove it from your system entirely, and delete all of its
|
62 |
+
database tables, before installing Bad Behavior 2.2.x or 2.0.x. If you are
|
63 |
+
upgrading from version 2.0.18 or prior, you must delete all of its files
|
64 |
+
before upgrading, but do not need to delete the database tables.
|
|
|
|
|
65 |
|
66 |
Bad Behavior has been designed to install on each host software in the
|
67 |
manner most appropriate to each platform. It's usually sufficient to
|
bad-behavior-wordpress.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Bad Behavior
|
4 |
-
Version: 2.1.
|
5 |
Description: Deny automated spambots access to your PHP-based Web site.
|
6 |
Plugin URI: http://www.bad-behavior.ioerror.us/
|
7 |
Author: Michael Hampton
|
@@ -100,7 +100,7 @@ function bb2_read_settings() {
|
|
100 |
global $wpdb;
|
101 |
|
102 |
// Add in default settings when they aren't yet present in WP
|
103 |
-
$settings =
|
104 |
if (!$settings) $settings = array();
|
105 |
return array_merge(array('log_table' => $wpdb->prefix . 'bad_behavior', 'display_stats' => true, 'strict' => false, 'verbose' => false, 'logging' => true, 'httpbl_key' => '', 'httpbl_threat' => '25', 'httpbl_maxage' => '30', 'offsite_forms' => false, 'reverse_proxy' => false, 'reverse_proxy_header' => 'X-Forwarded-For', 'reverse_proxy_addresses' => array(),), $settings);
|
106 |
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Bad Behavior
|
4 |
+
Version: 2.1.14
|
5 |
Description: Deny automated spambots access to your PHP-based Web site.
|
6 |
Plugin URI: http://www.bad-behavior.ioerror.us/
|
7 |
Author: Michael Hampton
|
100 |
global $wpdb;
|
101 |
|
102 |
// Add in default settings when they aren't yet present in WP
|
103 |
+
$settings = get_option('bad_behavior_settings');
|
104 |
if (!$settings) $settings = array();
|
105 |
return array_merge(array('log_table' => $wpdb->prefix . 'bad_behavior', 'display_stats' => true, 'strict' => false, 'verbose' => false, 'logging' => true, 'httpbl_key' => '', 'httpbl_threat' => '25', 'httpbl_maxage' => '30', 'offsite_forms' => false, 'reverse_proxy' => false, 'reverse_proxy_header' => 'X-Forwarded-For', 'reverse_proxy_addresses' => array(),), $settings);
|
106 |
|
bad-behavior/common_tests.inc.php
CHANGED
@@ -43,7 +43,7 @@ function bb2_misc_headers($settings, $package)
|
|
43 |
// Worse yet, some Javascript client-side apps do the same in
|
44 |
// blatant violation of the protocol and good sense.
|
45 |
// if (strpos($package['request_uri'], "#") !== FALSE || strpos($package['headers_mixed']['Referer'], "#") !== FALSE) {
|
46 |
-
if (strpos($package['request_uri'], "#") !== FALSE) {
|
47 |
return "dfd9b1ad";
|
48 |
}
|
49 |
// A pretty nasty SQL injection attack on IIS servers
|
43 |
// Worse yet, some Javascript client-side apps do the same in
|
44 |
// blatant violation of the protocol and good sense.
|
45 |
// if (strpos($package['request_uri'], "#") !== FALSE || strpos($package['headers_mixed']['Referer'], "#") !== FALSE) {
|
46 |
+
if ($settings['strict'] && strpos($package['request_uri'], "#") !== FALSE) {
|
47 |
return "dfd9b1ad";
|
48 |
}
|
49 |
// A pretty nasty SQL injection attack on IIS servers
|
bad-behavior/core.inc.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php if (!defined('BB2_CWD')) die("I said no cheating!");
|
2 |
-
define('BB2_VERSION', "2.1.
|
3 |
|
4 |
// Bad Behavior entry point is bb2_start()
|
5 |
// If you're reading this, you are probably lost.
|
@@ -142,7 +142,7 @@ function bb2_screen($settings, $package)
|
|
142 |
return $r;
|
143 |
}
|
144 |
return false;
|
145 |
-
} elseif (stripos($ua, "Googlebot") !== FALSE || stripos($ua, "Mediapartners-Google") !== FALSE) {
|
146 |
require_once(BB2_CORE . "/searchengine.inc.php");
|
147 |
if ($r = bb2_google($package)) {
|
148 |
if ($r == 1) return false; # whitelisted
|
1 |
<?php if (!defined('BB2_CWD')) die("I said no cheating!");
|
2 |
+
define('BB2_VERSION', "2.1.14");
|
3 |
|
4 |
// Bad Behavior entry point is bb2_start()
|
5 |
// If you're reading this, you are probably lost.
|
142 |
return $r;
|
143 |
}
|
144 |
return false;
|
145 |
+
} elseif (stripos($ua, "Googlebot") !== FALSE || stripos($ua, "Mediapartners-Google") !== FALSE || stripos($ua, "Google Web Preview") !== FALSE) {
|
146 |
require_once(BB2_CORE . "/searchengine.inc.php");
|
147 |
if ($r = bb2_google($package)) {
|
148 |
if ($r == 1) return false; # whitelisted
|