Version Description
Download this release
Release Info
Developer | error |
Plugin | Bad Behavior |
Version | 2.1.15 |
Comparing to | |
See all releases |
Code changes from version 2.1.14 to 2.1.15
- README.txt +3 -7
- bad-behavior-wordpress-admin.php +2 -2
- bad-behavior-wordpress.php +1 -1
- bad-behavior/core.inc.php +1 -1
- bad-behavior/searchengine.inc.php +2 -2
- bad-behavior/whitelist.inc.php +2 -1
- whitelist-sample.ini +3 -0
README.txt
CHANGED
@@ -4,7 +4,7 @@ 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.
|
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.
|
@@ -44,12 +44,8 @@ Installing and configuring Bad Behavior on most platforms is simple and takes
|
|
44 |
only a few minutes. In most cases, no configuration at all is needed. Simply
|
45 |
turn it on and stop worrying about spam!
|
46 |
|
47 |
-
The core of Bad Behavior is free software released under the GNU General
|
48 |
-
Public License, version
|
49 |
-
non-free platforms, special license terms exist for Bad Behavior's platform
|
50 |
-
connector.) The development version of Bad Behavior is free software released
|
51 |
-
under the GNU Lesser General Public License, version 3, or at your option,
|
52 |
-
any later version.
|
53 |
|
54 |
== Installation ==
|
55 |
|
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.1.15
|
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.
|
44 |
only a few minutes. In most cases, no configuration at all is needed. Simply
|
45 |
turn it on and stop worrying about spam!
|
46 |
|
47 |
+
The core of Bad Behavior is free software released under the GNU Lesser General
|
48 |
+
Public License, version 3, or at your option, any later version.
|
|
|
|
|
|
|
|
|
49 |
|
50 |
== Installation ==
|
51 |
|
bad-behavior-wordpress-admin.php
CHANGED
@@ -148,8 +148,8 @@ Displaying <strong><?php echo $count; ?></strong> of <strong><?php echo $totalco
|
|
148 |
<?php else: ?>
|
149 |
Displaying all <strong><?php echo $totalcount; ?></strong> records<br/>
|
150 |
<?php endif; ?>
|
151 |
-
<?php if (!$_GET['key'] && !$_GET['blocked']) { ?><a href="<?php echo add_query_arg(array("blocked" => "
|
152 |
-
<?php if (!$_GET['key'] && !$_GET['permitted']) { ?><a href="<?php echo add_query_arg(array("permitted" => "
|
153 |
</div>
|
154 |
</div>
|
155 |
|
148 |
<?php else: ?>
|
149 |
Displaying all <strong><?php echo $totalcount; ?></strong> records<br/>
|
150 |
<?php endif; ?>
|
151 |
+
<?php if (!$_GET['key'] && !$_GET['blocked']) { ?><a href="<?php echo add_query_arg(array("blocked" => "1", "permitted" => "0", "paged" => false), $request_uri); ?>">Show Blocked</a> <?php } ?>
|
152 |
+
<?php if (!$_GET['key'] && !$_GET['permitted']) { ?><a href="<?php echo add_query_arg(array("permitted" => "1", "blocked" => "0", "paged" => false), $request_uri); ?>">Show Permitted</a> <?php } ?>
|
153 |
</div>
|
154 |
</div>
|
155 |
|
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
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Bad Behavior
|
4 |
+
Version: 2.1.15
|
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
|
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.
|
1 |
<?php if (!defined('BB2_CWD')) die("I said no cheating!");
|
2 |
+
define('BB2_VERSION', "2.1.15");
|
3 |
|
4 |
// Bad Behavior entry point is bb2_start()
|
5 |
// If you're reading this, you are probably lost.
|
bad-behavior/searchengine.inc.php
CHANGED
@@ -6,7 +6,7 @@ require_once(BB2_CORE . "/roundtripdns.inc.php");
|
|
6 |
|
7 |
function bb2_google($package)
|
8 |
{
|
9 |
-
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) {
|
10 |
return "f1182195";
|
11 |
}
|
12 |
# Disabled due to http://bugs.php.net/bug.php?id=53092
|
@@ -34,7 +34,7 @@ function bb2_msnbot($package)
|
|
34 |
|
35 |
function bb2_yahoo($package)
|
36 |
{
|
37 |
-
if (match_cidr($package['ip'], array("202.160.176.0/20", "67.195.0.0/16", "203.209.252.0/24", "72.30.0.0/16", "98.136.0.0/14")) === FALSE) {
|
38 |
return '71436a15';
|
39 |
}
|
40 |
# Disabled due to http://bugs.php.net/bug.php?id=53092
|
6 |
|
7 |
function bb2_google($package)
|
8 |
{
|
9 |
+
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", "209.85.128.0/17")) === FALSE) {
|
10 |
return "f1182195";
|
11 |
}
|
12 |
# Disabled due to http://bugs.php.net/bug.php?id=53092
|
34 |
|
35 |
function bb2_yahoo($package)
|
36 |
{
|
37 |
+
if (match_cidr($package['ip'], array("202.160.176.0/20", "67.195.0.0/16", "203.209.252.0/24", "72.30.0.0/16", "98.136.0.0/14", "74.6.0.0/16")) === FALSE) {
|
38 |
return '71436a15';
|
39 |
}
|
40 |
# Disabled due to http://bugs.php.net/bug.php?id=53092
|
bad-behavior/whitelist.inc.php
CHANGED
@@ -21,7 +21,8 @@ function bb2_whitelist($package)
|
|
21 |
$request_uri = substr($package['request_uri'], 0, strpos($package['request_uri'], "?"));
|
22 |
}
|
23 |
foreach ($whitelists['url'] as $url) {
|
24 |
-
|
|
|
25 |
}
|
26 |
}
|
27 |
return false;
|
21 |
$request_uri = substr($package['request_uri'], 0, strpos($package['request_uri'], "?"));
|
22 |
}
|
23 |
foreach ($whitelists['url'] as $url) {
|
24 |
+
$pos = strpos($request_uri, $url);
|
25 |
+
if ($pos !== false && $pos == 0) return true;
|
26 |
}
|
27 |
}
|
28 |
return false;
|
whitelist-sample.ini
CHANGED
@@ -22,6 +22,9 @@ useragent[] = "Mozilla/4.0 (It's me, let me in)"
|
|
22 |
|
23 |
; URLs are matched from the first / after the server name up to, but not
|
24 |
; including, the ? (if any). The URL to be whitelisted is a URL on YOUR site.
|
|
|
|
|
|
|
25 |
|
26 |
[url]
|
27 |
url[] = "/example.php"
|
22 |
|
23 |
; URLs are matched from the first / after the server name up to, but not
|
24 |
; including, the ? (if any). The URL to be whitelisted is a URL on YOUR site.
|
25 |
+
; A partial URL match is permitted, so URL whitelist entries should be as
|
26 |
+
; specific as possible, but no more specific than necessary. For instance,
|
27 |
+
; "/example" would match "/example.php" and "/example/address".
|
28 |
|
29 |
[url]
|
30 |
url[] = "/example.php"
|