Checks
Each check awards points that are added up to a score. Only the total decides the result (see Configuration).
| Check | Detects | Points |
|---|---|---|
| Honeypot | invisible field pdir_as_note was filled in | spam threshold − 1 (default 9) |
| Timing | signed timestamp missing (6), tampered with (8), submitted in less than 3 seconds (6) or token older than 7 days (3, e.g. reused by bots) | 3–8 |
| Random strings | values like MLzgWpYNFFZsoFHEy in text fields | 5 per field, max. 10 |
| E-mail pattern | “dot trick” like a.b.cd.e.f.1.23@gmail.com | 4 |
| Links | links to foreign domains in text fields (2), 3 or more links (+3), BBCode/HTML links (5) | 2–10 |
| Language | English free text on a German-language page | 3 |
| Keywords | job applications, link trading, crypto/casino/pharma, cold pitch phrases | 2 per match, max. 4 |
| Duplicates | identical message and e-mail in the same form within 7 days | 4 |
| Custom rules | regex rules from the settings | any |
Details
Honeypot: The points are deliberately just below the spam threshold. A filled-in honeypot alone only makes a submission “suspicious”; any additional signal turns it into spam. This protects real visitors whose browser fills the hidden field via autofill.
Timing: A tolerance of 10 seconds applies for deviating server clocks.
Links: Links to the domain from a website field don’t count. A website field is a field with the input
validation url or with web, site, url, homepage or domain in its name.
Duplicates: Only free text (values containing spaces) of 20 characters or more is checked; shorter messages are not compared. On its own, the value stays below the grey zone threshold so that a resent request gets through.
Custom rules: To protect against expensive patterns (ReDoS), custom rules run with a backtrack limit of 100,000 (PHP default: 1,000,000) and only check the first 10,000 characters of a value. If a pattern aborts at the limit, it does not count as a match and is reported as a warning in the system log at most once per day. In general, form values are truncated to 20,000 characters for scoring.
Privacy and stored data
- No cookies are set and no external services are used.
- The timestamp is signed with the installation’s
kernel.secretand sent along with the form. - Duplicate detection: Only a SHA-256 hash of form ID, message and e-mail address is stored, no plain text. The
hashes are kept in
var/pdir_anti_spam/and deleted after 7 days. They survivecache:clearand deployments as long asvar/is preserved. The directory can be deleted at any time. - System log: form ID, score, decision and reasons – no form contents.
Known limitations
- The honeypot field is hidden with an inline
style. With a strict Content Security Policy withoutstyle-src 'unsafe-inline'it would be visible. - Forms submitted via Ajax (Contao 5) have not been tested in the browser yet, especially the redirect on silent discard.
- Only the Contao form generator is protected, not forms of extensions with their own processing.
- “[SPAM?]” in the subject only affects the e-mails sent by the form generator, not the Notification Center.
- The language check currently only rates English text on German-language pages.
- A domain a bot enters in the website field counts as the “own” domain for the link check. Other signals (random strings, timing, keywords) still apply.