Security baseline

  • Force HTTPS. The session cookie is marked Secure only when the System URL starts with https.
  • Keep the protective rules in the root .htaccess (below), and confirm /storage/ and /SHA256SUMS.txt are refused: Forbidden (403), or on some servers the site's own "page not found" page (below).
  • Give the admin area an address of its own, and restrict it to your office addresses at the web server if you can.
  • Use unique administrator accounts and multifactor authentication.
  • Apply least-privilege roles and review access regularly.
  • Keep PHP, the database, web server, and WBAMS dependencies supported.
  • Protect settings.php, the encryption hash, backups, logs, and private storage.
  • Delete the install/ directory once the installation is verified.
  • Run scheduler tasks as a constrained service account.
  • Monitor failed sign-ins, control activity, gateway callbacks, email, and scheduler completion.

What the root .htaccess refuses

Since 1.11.0 the web server's protective rules ship with WBAMS, in the root .htaccess, outside the ### BEGIN/END - WBAMS managed rules ### markers so that regenerating the managed rules keeps them. A fresh install has them; a site updated in place must copy them in, because an update never replaces the site's own .htaccess — see Upgrading to 1.11.0. A site upgraded to 1.12.0 replaces the block with 1.12.0's (Upgrading to 1.12.0). From 1.12.0 on, Update WBAMS adds what a later release adds to the block, and the folder guard files a site lacks, keeping every line of the site's own.

Folder listing
Off for the whole tree, without depending on how the autoindex module is named. The managed rules hand real folders to Apache, so on a host with listing on, every folder without an index file could otherwise be browsed.
Package and project files
SHA256SUMS.txt, the release's list of its files, composer.json and composer.lock, every *.md file, add-on manifests (wbams.json) and docs-inventory.json.
Page templates
Every .tpl file: a theme's pages, the Content Manager's sections and views, the admin area's pages and an add-on's templates. WBAMS reads them from disk, and nothing asks for one over the web. A theme's styles, scripts, images, fonts and LESS sources are served as before.
Data and leftovers
Database dumps, logs, backups and editor leftovers, wherever they land: .sql, .sqlite, .yml/.yaml, .neon, .dist, .lock, .bak, .old, .orig, .swp, .ini, .log, .sh, .ser, .env, and names ending in ~.
Dot-files
Any file whose name starts with a dot. The match is on the file name only, so certificate validation under .well-known/ is unaffected.
Code and data folders
resources/, build/, tools/, tests/ and storage/ — the compiled templates in storage/cache/ are PHP and ran when requested directly. Also an add-on's or gateway's lib/, data/, resources/, templates/, vendor/ and tests/, and PHP under core/ and framework/ except the few scripts meant to be requested (the API, the captcha image, the ticket attachment thumbnail and the CMS page loaders). Only what exists on disk is refused, so a website page with a similar address is never caught.
Response headers
X-Content-Type-Options: nosniff; X-Frame-Options: SAMEORIGIN and Referrer-Policy: strict-origin-when-cross-origin, unless a page sets its own (webmail does); and Strict-Transport-Security for a year on HTTPS, without includeSubDomains, and never for localhost, *.localhost or *.test. WBAMS's PHP sends all four on every page it serves, so they also arrive where these rules never reach PHP's pages: a host that runs PHP through its cgi handler, or nginx, which does not read .htaccess. The .htaccess itself sends nosniff and HSTS on every response, files included, and removes PHP's copies of those two first; X-Frame-Options and Referrer-Policy come from PHP alone, so a page's own value is never doubled.

Each of those folders, the media folders and the CMS's generated stylesheets also carry an .htaccess of their own (deny, or no PHP), for a server without mod_rewrite. If you replace the root file, keep these rules outside the markers. A request that names a parameter as a list (?language[]=x, ?rp[]=) is answered as though the parameter were absent rather than with an error.

What a refusal looks like depends on the server. Most answer Forbidden (403). Some send a refusal on to the site's own error page, so the address shows the site's "page not found" page with a 404: that is a refusal too. Either way the file itself does not come back. If it does, the rules are missing or the server does not read .htaccess.

Sign-in and password-reset limits

Wrong client sign-ins are limited wherever they come from: the sign-in page, the cart's sign-in and the client API.

Client sign-in
After 5 wrong attempts for one account name, or 20 from one address, within 15 minutes, every further attempt is refused — even with the right password — with the usual "incorrect" message, until the 15 minutes have passed. Nobody is banned for longer. A successful sign-in clears the account's count; it does not clear the address's, so one visitor trying many accounts stays counted.
Getting back in
Setting a new password through the reset email lifts the limit on that account straight away.
Password reset emails
At most 3 per address asked for, and 10 requests from one visitor, in 15 minutes. Past that the page answers exactly as usual and sends nothing, so it cannot be used to flood an inbox or to learn whether an address has an account. The activity log records Password Reset Request Not Sent: too many requests.
Not limited
An administrator's VerifySignIn API call, which checks logins on behalf of another system. The limits come on top of the ban on repeated failed sign-ins described in Team, roles, and access.

The counts are kept as hashes, for 15 minutes, in WBAMS's temporary data. A client who reports being refused with the right password has usually hit the limit: wait 15 minutes or reset the password.

Sessions

The session cookie is HttpOnly, marked Secure on an HTTPS System URL, and SameSite=Lax: it still comes with a top-level link or redirect from another site — a payment page sending a customer back, a sign-in provider's return — but not with a form another site posts here, nor inside another site's frame. PayPal (standard) sends the customer back with a plain link rather than a form post for that reason.

PHP's strict session mode is on, so a session id this server never issued — one planted in a visitor's browser — is replaced rather than adopted. Signing in, as a client or as an administrator, replaces the session id and ends the old one, so a copy of the id taken before sign-in is worthless.

PHP session storage must be writable only by the appropriate runtime users. Keep the administrator's user agent, password hash, encryption hash, and IP-check policy stable within a session. Unexpected session invalidation should be investigated rather than hidden with compatibility code.

Output and listings

  • A payment's transaction id is printed as text wherever it shows: Billing › Transactions and its edit form, an invoice's payments and gateway log, a client's transactions, a dispute, a billing note's ledger, the client's invoice and the "last payment" email field. A gateway or an API caller sets that value, and before 1.11.0 an id holding markup ran as script in the admin area.
  • Private knowledgebase articles, and articles in a hidden category or in none, are left out of every listing for visitors who may not open them: the category page, a tag's page, search results and their summaries, the most-read strip and sitemap.xml. A hidden knowledgebase or download category's own address answers 404 to visitors; a signed-in administrator still sees it. See Who sees an article.
  • Uploads to the media library are checked against their content, SVG files are screened for script, and every media folder refuses to run scripts. See Media library.

Reverse proxies

Trust forwarded headers only from configured proxy addresses. Confirm the application sees the correct HTTPS scheme, host, and client IP before enabling IP-dependent security checks. The sign-in limits count by client IP, so a proxy that is not trusted makes every visitor look like one address.

Incident response

  1. Preserve logs and record timestamps.
  2. Contain affected credentials, endpoints, or integrations.
  3. Determine impacted customers, records, money movement, and files.
  4. Restore trusted code/data only after identifying the cause.
  5. Rotate credentials and verify every connected system.
  6. Document corrective controls and test them.