Skip to main content

Checks

Each check awards points that are added up to a score. Only the total decides the result (see Configuration).

CheckDetectsPoints
Honeypotinvisible field pdir_as_note was filled inspam threshold − 1 (default 9)
Timingsigned 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 stringsvalues like MLzgWpYNFFZsoFHEy in text fields5 per field, max. 10
E-mail pattern“dot trick” like a.b.cd.e.f.1.23@gmail.com4
Linkslinks to foreign domains in text fields (2), 3 or more links (+3), BBCode/HTML links (5)2–10
LanguageEnglish free text on a German-language page3
Keywordsjob applications, link trading, crypto/casino/pharma, cold pitch phrases2 per match, max. 4
Duplicatesidentical message and e-mail in the same form within 7 days4
Custom rulesregex rules from the settingsany

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.secret and 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 survive cache:clear and deployments as long as var/ 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 without style-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.