Security Auditor — checks that the site search page caps its page size, returns nothing for an empty query, and does not nest
redirect parameters in pagination links.Resilience
An uncapped results page size lets anyone force very large search queries against the index.
Content exposure
An empty query that lists the whole index exposes content that was never meant to be browsed.
https://example.com/search), either the monitored URL itself or the page named by the searchPage preference. It fetches that page once, detects the platform, and runs the rules of the matching platform visitor. The first supported platform is Liferay; other platforms (for example WordPress) can be added as new visitors with their own rules and codes.
Preferences
These settings can be configured per monitored URL from the URL’s auditor configuration tab. OnlyresultSelector is required: the platform does not run the auditor for a URL until it is set (the Overview shows Needs configuration), so the 405 failure below only appears for runs started outside the platform.
How it works
- Fetch — loads the search page with the 37 Audits user agent (Basic auth is honoured). If the page cannot be fetched, or answers HTTP 400 or higher, the audit is
ERROR(500). - Detect — asks each visitor whether it recognises the platform. The Liferay visitor matches when the monitored stack lists Liferay, the response carries a
Liferay-Portalheader, or the HTML contains the Search Results portlet orLiferay.ThemeDisplay. No match isERROR(501). - Validate — the
resultSelectorpreference must be set (405) and must parse as a CSS selector or XPath (502). Nothing else runs until it does. - Probe (Liferay) — sends four requests to the search page, each bounded by
timeoutSeconds:?q=— empty query, default page size.?q=*— wildcard query, default page size. Also discovers the Search Results portlet namespace and a pagination link.?q=&delta=101— empty query with a page size one abovemaxDelta(plus the namespaced delta when known).?q=*&delta=101— wildcard query with a page size one abovemaxDelta.
- Count — on every answered probe, the elements matching
resultSelectorare counted. A probe that times out is aFAILon its own and is not counted. - Redirect chain — links on the wildcard page and on its first pagination page are decoded looking for a
redirectparameter that nests another one. - Aggregate —
ERRORwins, thenFAIL, thenWARNING; if every rule passes, the audit isSUCCESS(200).
What it audits
Every row maps to onecheckRule* method and one CheckCode. Codes 500–502, 405 and 200 apply to every platform; 300 and 400–404 belong to the Liferay visitor. A future platform visitor continues the same sequence. CheckCode suffixes use status ranges: 200 success, 300–399 warning, 400–499 fail, 500–599 error.
Output documentation
Risks and considerations
Uncapped page size is a denial-of-service vector
- Liferay reads the
deltaparameter to size the results page. Without a cap,?delta=5000makes the portal ask Elasticsearch for thousands of documents and render them all, on every request. - Liferay caps
deltaat 200 by default, but custom themes, fragments and portlet configuration can raise or bypass it. This auditor expectsmaxDelta(100 by default) or less, and only ever asks for one result more than that.
Empty searches list the whole index
- With “Allow Empty Searches” enabled,
?q=returns every indexed document. That surfaces content that is only reachable by search (drafts, internal pages, documents) and makes scraping trivial.
Redirect chains break URLs
- Liferay portlets append the current URL as a
redirectparameter so “back” navigation works. When a pagination link re-encodes a URL that already carries aredirect, every page change nests one more level. After a few clicks the URL is several kilobytes long, breaks caches and proxies, and eventually hits request-line limits. - Links from other portlets on the search page (for example Asset Publisher) are scanned too, because the same mechanism affects them.
Timeouts are findings
- Liferay renders every result item server side. A request that cannot answer within
timeoutSeconds(default 20) is a sign that the page size or the empty search is not capped, and is reported as aFAILrather than an auditor error. - Slow but correctly configured sites can raise
timeoutSecondsup to 30 per URL.
What this auditor does not check
- It does not audit search relevance, indexing coverage, or the search bar on other pages.
- If the search index has
maxDeltaor fewer documents matching*, thedeltarule cannot prove a violation and passes. - If the results page has no pagination link, the redirect chain rule only inspects the results page itself.
- Counting depends entirely on
resultSelector. A selector that matches nothing makes every count rule pass; verify it against the live page when configuring the URL.