Skip to content

fix(api): keep server-side fetches on the hosts they are meant for - #999

Open
Medformatik wants to merge 1 commit into
fix/maptiler-style-key-passthroughfrom
fix/outbound-url-trust
Open

Medformatik wants to merge 1 commit into
fix/maptiler-style-key-passthroughfrom
fix/outbound-url-trust

Conversation

@Medformatik

@Medformatik Medformatik commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

What changed and why

Two server-side fetches could reach hosts they were not meant for.

The CityBikes client appended a link taken from the upstream network index to its base URL as text. A link that did not start with a single slash would have named a different host. The client now resolves the link against the base and uses it only when it is a network path on the CityBikes origin; other entries are dropped before the index is cached and skipped again before each fetch.

OPENMAPX_ALLOW_PRIVATE_FEED_HOSTS lets an operator reach transit and mobility feed mirrors on a private network. The safe fetch helpers applied it by default to every caller that did not say otherwise, which included the extension store's catalog, manifest and revocation requests. The default is now no private hosts. The mobility transport and the GOFS fetchers pass the feed list themselves, and the extension store states the refusal explicitly. The variable is now documented in the configuration reference.

A sweep of the integrations for the same URL pattern found no other instance. Noted for later and not changed here: the bike-sharing clients call the shared fetch helper instead of the integration HTTP client.

Related work

Sixth layer of the stack that starts with #983. It covers two audit findings in one change because both are a few lines in the same area.

Verification

  • Focused tests pass (298 tests in nine files): a new CityBikes client test with off-origin link shapes that are never fetched and a normal link that still is, safe-download cases for the new default and the mobility opt-in, extension-store cases for an allowlisted private host, and the existing bike-sharing, extension-store and GOFS tests.
  • check-types passes for packages/core and apps/api (which covers the integrations); Biome, Prettier, check-declared-imports, check-integration-cache-writes and check-unused-exports pass.
  • Not done: a request against the real CityBikes API or a real private feed mirror.

Release and upgrade impact

No operator action and no migration. Feed mirrors on allowlisted private hosts keep working.

No package release: the extension CLI is counted through shared core sources; the changed default only affects server-side fetch helpers the CLI does not call with private hosts.

@Medformatik Medformatik self-assigned this Nov 16, 2026
@Medformatik
Medformatik added this pull request to stack #985 November 16, 2026 09:26
@Medformatik
Medformatik force-pushed the fix/outbound-url-trust branch from 2810941 to e56daf0 Compare November 16, 2026 10:00
The CityBikes client built a request URL by appending a link from the
upstream index to its base, so the link could name another host; it now
accepts only a network path on the CityBikes origin. The private feed host
setting applied to every safe fetch by default, including the extension
store; feed downloads now opt in and everything else refuses private hosts.
@Medformatik
Medformatik force-pushed the fix/outbound-url-trust branch from e56daf0 to 4db59ba Compare November 16, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant