[6.x] Forms 2: Spam submissions - #15205
Open
duncanmcclean wants to merge 5 commits into
Open
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds the concept of spam form submissions.
A submission can be flagged with
spam: trueand it'll be reported and displayed as spam, hidden from the submissions listing, and excluded from submission counts and submission limits.Honeypot behavior
Forms have a new "Honeypot Behavior" setting on the configuration screen, controlling what happens to submissions caught by the honeypot:
Either way, the visitor receives the same response as a successful submission, so bots can't tell they've been caught.
Marking submissions as spam / not spam
This PR also adds "Mark as Spam" and "Mark as Not Spam" actions to the submissions listing.
When a submission that was caught before being finalized is marked as not spam, it gets finalized as normal — triggering any configured emails and connections at that point. Submissions that were manually flagged after being finalized simply have the flag removed, so nothing is re-triggered.
Marking submissions as spam from addons
The honeypot is the first thing to take advantage of the spam status, but addon developers can also mark submissions as spam inside event listeners if they wish:
Returning
falsehalts the submission pipeline while still giving the visitor a successful response. Since the submission was saved as spam beforehand, it'll be waiting in the submissions listing for review.