Closed (fixed)
Project:
http:BL
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
6 Mar 2011 at 06:30 UTC
Updated:
24 Mar 2011 at 11:11 UTC
I am interested in checking http:BL on user registration in addition to comment submission. I find this to be less invasive than every request I am receiving reports of legitimate users being blocked after being assigned an old poisoned IP. Alternatively maybe a configurable grey / black list threshold could be useful.
Anyway just eyeballing the code to see what is happening and I noticed this:
function httpbl_boot() {
// Only continue when checks are enabled
if (variable_get('httpbl_check', HTTPBL_CHECK_NONE) == HTTPBL_CHECK_NONE) {
return;
}
So I checked and if I choose HTTPBL_CHECK_COMMENTS in the settings, the above code means that a check is going to be made on hook_boot on every request regardless.
Here is a patch to fix it.
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -77,7 +77,7 @@
*/
function httpbl_boot() {
// Only continue when checks are enabled
- if (variable_get('httpbl_check', HTTPBL_CHECK_NONE) == HTTPBL_CHECK_NONE) {
+ if (variable_get('httpbl_check', HTTPBL_CHECK_NONE) != HTTPBL_CHECK_ALL) {
return;
}
Comments
Comment #1
praseodym commentedYou're right! Fixed in commit 5a9e362.