Closed (fixed)
Project:
Honeypot
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
12 Apr 2013 at 22:07 UTC
Updated:
16 Aug 2013 at 16:02 UTC
Jump to comment: Most recent file
In response to #1859090-20: Ban persistent spammers, possibly through integrating another module, I'm going to add a hook, hook_honeypot_reject(), which will allow other modules to react when Honeypot rejects a form submission.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | honeypot.module-6.x-1969212.patch | 1.04 KB | mr.j |
| #3 | 1969212-3-reject-hook.patch | 1.96 KB | geerlingguy |
| #1 | 1969212-1-reject-hook.patch | 1.93 KB | geerlingguy |
Comments
Comment #1
geerlingguy commentedAttached patch adds the hook. Waiting for testbot.
Comment #2
geerlingguy commentedD7 fix in commit http://drupalcode.org/project/honeypot.git/commit/b06de68
Will forward-port to D8 next.
Comment #3
geerlingguy commentedOkay, will wait for testbot on this one.
Comment #5
geerlingguy commentedHmm... could be something that's changed in D8 since my last work on the branch.
Comment #6
geerlingguy commented#3: 1969212-3-reject-hook.patch queued for re-testing.
Comment #8
geerlingguy commented#3: 1969212-3-reject-hook.patch queued for re-testing.
Comment #9
geerlingguy commentedTests passed locally. I guess the older test was a quirk.
Comment #11
mr.j commentedI recently replaced my homebrew solution to this problem with the honeypot module but this feature was one thing that the module lacked in comparison so I have a patch against 6.x-1.14 attached.
I added the $type variable to the hook_ call because I want to auto-ban anything that submits the honeypot field, but not ban someone that trips the time limit because there is a much bigger chance that they could be human as the time limit applies across all forms, not individual ones. eg. 5 seconds is great on the registration form that needs time to fill out but not so good on the reset password field where it can be beaten manually.
This is my module code that uses the troll module for anyone interested:
Comment #13
geerlingguy commentedI've opened a new issue for this API improvement: #2067221: Add $type parameter to hook_honeypot_reject(). Thanks for submitting!
Note that the new parameter should be added onto the end of the list of parameters, so that this small API addition doesn't break anyone's existing integrations.