Installed Bad Behaviour to try to stop some subscription spam but think I found a bug in the code which makes the plugin whitelist all urls that are not listed in the whitelist url parameter.
From whitelist.inc.php:
Isn't this code saying that if the url and the whitlist url DON'T match then return true? Returning true indicates a whitelist situation and none of the other checks will be performed.PHP Code:if (!empty($bb2_whitelist_urls)) {
$request_uri = substr($settings['request_uri'], 0, strpos($settings['request_uri'], "?"));
foreach ($bb2_whitelist_urls as $url) {
if (!strcmp($request_uri, $url)) return true;
}
}
By changing this one line:
toPHP Code:if (!strcmp($request_uri, $url)) return true;
Should solve the issue.PHP Code:if (strcmp($request_uri, $url)) return true;
This seems to be in the latest Bad Behavior code.
Can someone check me on that?



Reply With Quote

