Hardening: unhooked emitters show the primary host on alias/onion pages #15

Closed
opened 2026-10-15 22:38:58 -07:00 by eric · 0 comments
Owner

Type: hardening / onion privacy hygiene. Found by security audit run 3 (commit 01195c8) in a single-site lab sweep of core URL emitters.

What happens

On pages served on a non-primary host (for example the onion), these core emitters still output the primary clearnet host because the plugin does not filter them:

  • REST index url field (raw siteurl option);
  • get_header_image() / get_background_image() (absolute theme_mod URLs);
  • HreflangEmitter always emits an x-default link to the primary host (src/Seo/HreflangEmitter.php:72-78), even when no host has a locale.

(Feed/REST guid is tracked separately in #10.) Correctly rewritten already: Link headers, import map / script modules, srcset, site icon, custom logo, oEmbed and RSD links.

Why it is only hardening

Only the primary host is disclosed, never a client-chosen host, and hreflang already publishes configured hosts by design.

Suggested fix

Route rest_index (url), theme_mod_header_image and theme_mod_background_image through UrlRewriter. Consider emitting x-default only when at least one host has a locale, and document that hreflang publishes the primary host on every alias.

**Type:** hardening / onion privacy hygiene. Found by security audit run 3 (commit `01195c8`) in a single-site lab sweep of core URL emitters. ## What happens On pages served on a non-primary host (for example the onion), these core emitters still output the primary clearnet host because the plugin does not filter them: - REST index `url` field (raw `siteurl` option); - `get_header_image()` / `get_background_image()` (absolute theme_mod URLs); - `HreflangEmitter` always emits an `x-default` link to the primary host (`src/Seo/HreflangEmitter.php:72-78`), even when no host has a locale. (Feed/REST `guid` is tracked separately in #10.) Correctly rewritten already: Link headers, import map / script modules, srcset, site icon, custom logo, oEmbed and RSD links. ## Why it is only hardening Only the primary host is disclosed, never a client-chosen host, and hreflang already publishes configured hosts by design. ## Suggested fix Route `rest_index` (url), `theme_mod_header_image` and `theme_mod_background_image` through `UrlRewriter`. Consider emitting `x-default` only when at least one host has a locale, and document that hreflang publishes the primary host on every alias.
eric closed this issue 2026-10-16 13:04:29 -07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
eric/multi-domain-redux#15
No description provided.