It would be nice to give a properly permissioned user the ability to clear the flood table, either completely or on a per-IP or per-user basis.

Comments

acrollet’s picture

Status: Active » Needs review
StatusFileSize
new7.17 KB

We had this need as well, so I've generated a patch. It adds a fieldset for users and IPs, and each may be cleared from the flood table individually or wholesale (via the check all checkbox)

damienmckenna’s picture

This looks really cool, will try to test it out today.

Sborsody’s picture

Status: Needs review » Needs work

I love this feature. Functionally it works. I think the UI needs improvement. If I remove a blocked user, it also re-saves the configuration options, which is unnecessary. Let's separate the settings and user management form.

Sborsody’s picture

Status: Needs work » Needs review
StatusFileSize
new7.68 KB

This patch does the same as in #1 but moves the blocked users and ips ui to its own form under /admin/config/people/blocked-logins.

fabianderijk’s picture

I've created a module for this: http://drupal.org/project/flood_unblock

damienmckenna’s picture

@fabianderijk: Would you be willing to merge that into Flood Control? We might even be able to talk Dave into setting you up as a co-maintainer :)

fabianderijk’s picture

@DamienMcKenna: Why not, I think this is a good spot for it. You can add me as a co-maintainer if you would like.

zserno’s picture

Patch in #4 applies to 7.x-1.x-dev and works perfectly. Well done and thanks! :)

Whiskey’s picture

+1 Excellent patch, thanks.

Leeteq’s picture

Issue summary: View changes

Is this ready for -dev?

Edit: Should the flood_unblock module be mentioned on the project page?

crystaldawn’s picture

This seems like it might be out of scope for this particular project. Its probably best suited for either the cbp module (which already has half of the request features here) or the flood_unblock module which has the other half (full clear). cbp module currently is able to clear floods for user OR ip flood entries by using 3 different methods. You can either whitelist an IP and then delete it which clears both user and IP entries, you can delete an IP Block which in turn also deletes it's IP entries in the flood table (but it wont touch user entries), or the user themselves can clear their own entries simply by using a "reset/one-time login" link.

Sborsody’s picture

IMHO it is a bit silly that cbp relies on this module and flood_unblock when the maintainers of flood_control and flood_unblock both agreed to merge their code. Why don't you all just merge your code into a single module and be co-maintainers for that? Take over this project? Can you tell I'm not a big fan of having half a dozen little modules when one can suffice?

jwilson3’s picture

#12++ Module overlap for tiny modules like this sucks, particularly on large sites with 100+ module, a new module for each little partial functionality like this starts to add up.

crystaldawn’s picture

I do not control either project owners. Any agreements to merge are of their own decision and I've not heard or seen anything to that effect myself. Merging these with cbp would not make any sense as it really should be handled in core and not a module to begin with. But since thats not the case, these 2 modules do exist. I do however agree that those should both be combined and then I can change the dependency to a single module rather than two. If they are then added to core, that dependency goes away. These 2 modules exist not because there is an added feature/benefit, they exist because the flood controls in drupal are a completely unfinished feature that was abandoned for whatever reason. I highly doubt we'll ever see these pulled into core and thus the only solution I can see is that there will always be at least 1 module to patch the missing requirements to the core flood/ban system. The best we can hope for is for flood_control and flood_unblock to become 1 module at some point. Not everyone who uses these 2 modules will want CBP, but anyone who uses CBP is definitely going to want the features of these 2 modules, thus the dependency makes complete sense. Adding these features to CBP would not make sense because it would then result in code duplication which the core team frowns upon immensely. I have seen them delete entire projects just because the project duplicated code provided by other modules for convenience sake.

jwilson3’s picture

@crystaldawn, your module is indeed quite different from flood_unblock and flood_control and has some separate value added, which can justify it as a separate module. flood_block and flood_control should be combined.

khayong’s picture

When the flood events based on the uid only is enabled (user_failed_login_identifier_uid_only = TRUE), the function to clear the flood table per-user basis does not work.

Have updated the code on top of this patch

#1 flood_control-manually_clear_flood_entries-1239854-1.patch

batigolix’s picture

Status: Needs review » Postponed (maintainer needs more info)

Flood Unblock and Flood Control will be merged and made available for Drupal 8 and beyond. Work in progress: #3176717: Incorporate functionality from Flood Unblock

For Drupal 7 keep using both modules.

If you prefer a D7 module that incorporates the Flood Unblock functionality then create a patch that adds all the functionality that Flood Unblock offers in its D7 version.

batigolix’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)