Install

Works with Drupal: ^11.2 || ^12

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 684.74 KB
MD5: 94b793c6647e2aedec861d83a0c116d9
SHA-1: 4e9763eee125e9c92446f0d415be9945e8fd3f14
SHA-256: 7e63ca1b62abd862a3a615417147b0cdf5e63f5c10bc76962b0927906411978a
Download zip 891.96 KB
MD5: b956d4f5bb9bfb7c604281baab84df2f
SHA-1: 9a08aa7d34fe56e0705fb212687837419664891d
SHA-256: cd551cb29566ccfddb6f0298bd59fcd53446b91922cddfc8ab6575a71ff210b1

Release notes

One new capability, for a kind of traffic no rule could describe before.

## Capping facet crawling

Bots walk a search or listing page through every combination of facets —
`?f[0]=type:article&f[1]=tag:a&f[2]=tag:b&f[3]=year:2026` — and each combination
is an uncacheable faceted search. People rarely apply more than two or three.

Nothing could express a cap on that until now. `query.f` resolves to nothing for
a list, PHP keeps only the last of `f=a&f=b`, and a regex over the query string
misses sparse keys, repeated names and interleaving.

A **Request / URL** rule can now match on:

- **`query_count.f`** — how many values arrived for `f`, counted from the raw
query string, so `f[0]=`, `f[]=`, sparse or named keys, encoded brackets and a
repeated `f=` all count the same. A bot cannot get under the cap by changing
how it writes the URL.
- **`query_count`** — how many query parameters arrived in total.

A parameter that is absent counts 0.

The rule to write: `path` starts with `/search` **and** `query_count.f` greater
than `3`. Drupal's Search API uses `f`; use your own parameter name if it
differs.

**Prefer a challenge to a block here.** A block also bans the address, so a real
person who genuinely applied four facets is shut out for the ban period. A
challenge lets them through by solving it. It is also worth pairing with a rate
limit on the search path, for crawlers that stay under the cap but request
thousands of combinations anyway.

Needs `kanopi/firewall` 2.36.0 or later. On an older release the variable is not
offered at all, rather than offered and quietly matching nothing.

## Compatibility

No configuration changes, and no rule needs re-saving. Requires
`kanopi/firewall` ^2.35.1 as before; 2.36.0 or later to use the new variable.

1.x needs PHP 8.1+ and Drupal ^10.6 || ^11; 2.x needs PHP 8.3+ and Drupal
^11.2 || ^12.

Verified against kanopi/firewall 2.36.0, Drupal core 11.4.8,
matomo/device-detector 6.5.2 and twig 3.30.0.

## Tests

814 unit and kernel tests and 268 functional, on both branches.

Created by: sean_e_dietrich
Created on: 1 Oct 2026 at 06:26 UTC
Last updated: 1 Oct 2026 at 06:27 UTC
Bug fixes
New features

Other releases