Install
Works with Drupal: ^11.2 || ^12Using Composer to manage Drupal site dependencies
Alternative installation files
Release notes
This release ships the same work as 1.0.0-beta8, which covers Drupal 10.6 and Drupal 11. It is mostly about making the firewall behave correctly where nobody was looking: two silent failures fixed, and the test suite taken from 683 cases to 786.
Before you update
This release requires kanopi/firewall ^2.26, up from ^2.24 in beta7. composer update drupal/basic_firewall --with-dependencies will pull it.
No update hooks are added. Nothing in this release changes stored configuration.
One behavior change worth knowing
A challenge rule in exception mode now serves the interstitial instead of refusing. Previously it returned a bare 403, because the library reported that an interstitial was required without providing one to serve. Since kanopi/firewall 2.26.0 the exception carries the provider and the render context, so this mode now answers as blocking mode does: 200 with the interstitial, text/html, no-store.
This matters because the bot detector flags curl, ApacheBench and most monitoring agents. A visitor it merely suspected was getting a 403 with no way to prove otherwise; now they get the chance to. If you have monitoring that treats a 403 from a challenged path as expected, it will now see a 200 with challenge HTML instead.
Two silent failures fixed
- Database storage no longer fails open on the settings.php path. With database storage and credentials reused from Drupal, that optional early-evaluation path allowed every request while the interface reported the firewall as enabled and blocking. The bootstrap now offers
basic_firewall_database_overrides(), and the status page's generated snippet prints the form your configuration actually needs. If credentials are needed and missing, the log now names the paths and the exact call that fixes them instead of surfacing a driver error. - A failed compile no longer retries on every request. An unwritable private directory made every request attempt a full compile, fail, and write a log row — at request rate, while the firewall enforced nothing. Automatic rebuilds now back off to one attempt a minute; a deliberate rebuild, from the Rebuild form or
drush basic-firewall:rebuild, is never throttled. A failed compile now appears on the status report as an error.
Testing
The bulk of this release. The suite went from 683 cases to 786, concentrated on the things that had never been exercised:
- The eight post-update hooks, and their no-op guards — the half that can damage a live site. The challenge secret is never replaced, provider options are not migrated over newer values, and a deliberate
0cron interval is distinguished from an absent one. - Uninstall: the compiled file, its metadata sidecar and the log table are all removed.
- Redaction of stored request headers on the blocked-client detail screen, which had no coverage at all.
- The cookie a solved challenge mints, and a real solved-challenge round trip.
- The import screen, which no test had ever requested — both modes, the preview's classification, and a malformed advanced YAML body being reported rather than applied.
- Recompiling after a Drupal configuration import, and the "Save order and status" button.
- The ASN, geolocation and Core Rule Set rule forms, which were previously only rendered, never submitted.
- The Drush commands' published names, aliases and options, so a rename that would break a deploy script fails here first.
Known issue
A challenge interstitial posts outside the site on a subdirectory install. The form's submit URL is root-relative, so on a site served from example.com/drupal/ the answer never reaches the firewall and the visitor is challenged again. A challenge rule on such a site refuses every human who tries to satisfy it. It cannot be configured around today, because the same value is both the form action and the path the firewall matches incoming requests against. Sites served from the document root are unaffected.