Question about _httpbl_cache_update()

bryrock - September 19, 2009 - 21:26
Project:http:BL
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:minor
Assigned:praseodym
Status:active
Description

In this function the code for adding a blacklisted IP to {access}, thereby banning it, is inoperable by virtue of being commented out. Is this an oversight or is there a reason for this?

As the module works now, overall, any IP blacklisted after a DNS lookup at Honeypot will be added to {access} and be banned, but if a greylisted IP attempts and fails the whitelisting challenge, it will be blacklisted only in {httpbl} but, because the code is commented out, not be banned altogether.

I meant to bring this up a few days ago, but I've been using the module on four sites with this code being operable, so I forgot about it being "officially" commented out until I reviewed the latest snapshot. It seems to work great, by the way.

Also, immediately above the commented-out code is a ToDo note in comments about checking for duplicates, but it seems that would not be necessary since a banned site would not be capable of gaining access for future blacklisting consideration until after the first ban has expired.

#1

praseodym - September 19, 2009 - 21:45
Category:support request» bug report
Priority:normal» minor
Assigned to:Anonymous» praseodym

I don't remember why this is commented; I must have had a reason for it but I can't remember any more. Looks like it'd be fine to uncomment the code. It's not a very big problem though, since requests will be blocked by hook_boot anyway.

#2

bryrock - September 19, 2009 - 22:08

True enough; not a "big problem," but for the sake of consistency, ban any and all blacklisted IPs. From a user support standpoint, if ever the question is asked, "Are blacklisted sites also banned?" then the answer is an emphatic "yes" that requires no further explanation, instead of "well, sometimes."

 
 

Drupal is a registered trademark of Dries Buytaert.