Version Description
Download this release
Release Info
Developer | error |
Plugin | Bad Behavior |
Version | 2.0.13 |
Comparing to | |
See all releases |
Code changes from version 2.0.12 to 2.0.13
- README.txt +1 -1
- bad-behavior-mediawiki.php +2 -1
- bad-behavior-wordpress.php +1 -1
- bad-behavior/blacklist.inc.php +2 -2
- bad-behavior/version.inc.php +1 -1
README.txt
CHANGED
@@ -4,7 +4,7 @@ Contributors: error, MarkJaquith, Firas, skeltoac
|
|
4 |
Donate link: http://www.bad-behavior.ioerror.us/
|
5 |
Requires at least: 1.2
|
6 |
Tested up to: 2.3.2
|
7 |
-
Stable tag: 2.0.
|
8 |
|
9 |
Bad Behavior is a set of PHP scripts which prevents spambots and other
|
10 |
malicious accesses to your PHP-based Web site. It prevents comment spam,
|
4 |
Donate link: http://www.bad-behavior.ioerror.us/
|
5 |
Requires at least: 1.2
|
6 |
Tested up to: 2.3.2
|
7 |
+
Stable tag: 2.0.13
|
8 |
|
9 |
Bad Behavior is a set of PHP scripts which prevents spambots and other
|
10 |
malicious accesses to your PHP-based Web site. It prevents comment spam,
|
bad-behavior-mediawiki.php
CHANGED
@@ -119,6 +119,7 @@ function bb2_relative_path() {
|
|
119 |
function bb2_mediawiki_timer(&$parser, &$text) {
|
120 |
global $bb2_timer_total;
|
121 |
$text = "<!-- Bad Behavior " . BB2_VERSION . " run time: " . number_format(1000 * $bb2_timer_total, 3) . " ms -->" . $text;
|
|
|
122 |
}
|
123 |
|
124 |
function bb2_mediawiki_entry() {
|
@@ -148,7 +149,7 @@ $wgExtensionCredits['other'][] = array(
|
|
148 |
'url' => 'http://www.bad-behavior.ioerror.us/'
|
149 |
);
|
150 |
|
151 |
-
|
152 |
$wgExtensionFunctions[] = 'bb2_mediawiki_entry';
|
153 |
|
154 |
?>
|
119 |
function bb2_mediawiki_timer(&$parser, &$text) {
|
120 |
global $bb2_timer_total;
|
121 |
$text = "<!-- Bad Behavior " . BB2_VERSION . " run time: " . number_format(1000 * $bb2_timer_total, 3) . " ms -->" . $text;
|
122 |
+
return true;
|
123 |
}
|
124 |
|
125 |
function bb2_mediawiki_entry() {
|
149 |
'url' => 'http://www.bad-behavior.ioerror.us/'
|
150 |
);
|
151 |
|
152 |
+
#$wgHooks['ParserAfterTidy'][] = 'bb2_mediawiki_timer';
|
153 |
$wgExtensionFunctions[] = 'bb2_mediawiki_entry';
|
154 |
|
155 |
?>
|
bad-behavior-wordpress.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Bad Behavior
|
4 |
-
Version: 2.0.
|
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.0.13
|
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/blacklist.inc.php
CHANGED
@@ -89,14 +89,14 @@ function bb2_blacklist($package) {
|
|
89 |
$ua = $package['headers_mixed']['User-Agent'];
|
90 |
|
91 |
foreach ($bb2_spambots_0 as $spambot) {
|
92 |
-
$pos =
|
93 |
if ($pos !== FALSE && $pos == 0) {
|
94 |
return "17f4e8c8";
|
95 |
}
|
96 |
}
|
97 |
|
98 |
foreach ($bb2_spambots as $spambot) {
|
99 |
-
if (
|
100 |
return "17f4e8c8";
|
101 |
}
|
102 |
}
|
89 |
$ua = $package['headers_mixed']['User-Agent'];
|
90 |
|
91 |
foreach ($bb2_spambots_0 as $spambot) {
|
92 |
+
$pos = strpos($ua, $spambot);
|
93 |
if ($pos !== FALSE && $pos == 0) {
|
94 |
return "17f4e8c8";
|
95 |
}
|
96 |
}
|
97 |
|
98 |
foreach ($bb2_spambots as $spambot) {
|
99 |
+
if (strpos($ua, $spambot) !== FALSE) {
|
100 |
return "17f4e8c8";
|
101 |
}
|
102 |
}
|
bad-behavior/version.inc.php
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
<?php if (!defined('BB2_CWD')) die("I said no cheating!");
|
2 |
-
define('BB2_VERSION', "2.0.
|
3 |
?>
|
1 |
<?php if (!defined('BB2_CWD')) die("I said no cheating!");
|
2 |
+
define('BB2_VERSION', "2.0.13");
|
3 |
?>
|