Problem/Motivation

We are adding multiple layers of anti spam measures to our project. Whenever a layer fails validation, we would like to log an event in the flood table to eventually automatically block users when they go over a certain threshold. A hook seems the most flexible, the honeypot module has hook_honeypot_reject() for this. Maybe we could add something similar.

Proposed resolution

It would be great if the antibot module would add hook_antibot_reject() to respond to validation failures for antibot. In our case we would log to the flood table, but maybe other modules want a different way of handling this.

Remaining tasks

  • Write a patch
  • Review
  • Commit

User interface changes

None

API changes

A new hook hook_antibot_reject() will be added.

CommentFileSizeAuthor
#2 3548615-2.patch1.34 KBseanb

Issue fork antibot-3548615

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

seanb created an issue. See original summary.

seanb’s picture

Status: Active » Needs review
StatusFileSize
new1.34 KB

Here is a first simple patch that should do it.

danrod’s picture

Hi @seanb , I'm ok with this, would be a nice addition to the antibot.api.php API and it's a good starting point and it's up to the developer to implement extra validations or log the validation failure.

I'll merge this (I'll create a MR)

danrod’s picture

Merged, thanks a lot @seanb .

Credits given.

danrod’s picture

Status: Needs review » Reviewed & tested by the community
danrod’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.