Remote exit nodes get their Traefik config from /hybrid/traefik-config
with local sites included, and dial those targets inside the customer's
own network, where localhost targets are normal. The previous commit
applied the local-site restrictions to them too.
- createSite only checks flags.disable_local_sites, not
traefik.site_types (SaaS has ["newt"] centrally but serves local sites
through remote exit nodes).
- Target validation for local sites runs only when Pangolin's own Traefik
serves the site (no exit node or a non-remote exit node), in
createTarget, updateTarget and blueprints.
- The private Traefik config skips bad local targets only when the config
is not for a remote exit node.
- Migration notes updated, including a query that excludes remote-node
sites.
PAN-1885
Deployments where Traefik never polls the HTTP provider (file_mode edge
nodes, Kubernetes CRDs) can now switch the endpoint off instead of
managing a token.
PAN-1885
bannedEmails only matched exact addresses, so an attacker on a disposable
domain kept signing up with new addresses (and "+tag" variants), and the
list was not checked at all for users provisioned through an OIDC IdP.
- bannedEmailCandidates: exact address, address without "+tag", and
"@domain" for the domain and each parent domain (never a bare TLD).
- isEmailBanned is used by signup and by validateOidcCallback before a
new OIDC user is created.
AI provider upstreamUrl was only z.url() and the AI gateway streamed the
upstream response back, so any org admin could read internal services,
Pangolin's own internal API or the cloud metadata service (prod had a
provider pointed at 169.254.169.254). Alert webhooks and HTTP log
streaming fetched any URL and followed redirects.
- server/lib/outboundAddress.ts (no config dependency, unit tested):
always refuses loopback, unspecified, link-local, broadcast, multicast
and reserved addresses (incl. IPv4-mapped forms), localhost and
Pangolin's own service names; refuses RFC1918/ULA/CGNAT when private
outbound is blocked. Provides a resolver check and a connect-time DNS
lookup so rebinding cannot get around it.
- server/lib/outboundUrlGuard.ts: policy from config. New
flags.block_private_outbound_urls defaults to on for SaaS, off for
self-hosted (local models).
- aiGatewayUpstreamFetch checks the host and passes the guarded lookup to
every upstream request; create/updateAiProvider reject blocked URLs.
- sendAlertWebhook and HttpLogDestination check the URL before sending
and no longer follow redirects.
- Migration notes cover the flag and a query for providers that will
stop working.
PAN-1799 (3v9x, 4g5q)
Traefik dials a local site's targets from inside Pangolin's own network, so
an org admin could create a local site with a target such as pangolin:3001
and publish the internal API (including the unauthenticated
/traefik-config, which lists every org's header values and gateway trust
tokens) on their own hostname. disable_local_sites was only read by the
dashboard; the server-side check in createSite was commented out.
- createSite refuses local sites when flags.disable_local_sites is set or
"local" is not in traefik.site_types, and basic WireGuard sites when
flags.disable_basic_wireguard_sites is set.
- New localSiteTargetError rejects loopback, unspecified, link-local
(incl. 169.254.169.254), broadcast, localhost, the internal hostname,
gerbil, traefik and badger. createTarget, updateTarget and blueprint
targets refuse them on local sites, and both Traefik config generators
skip existing ones.
- Optional traefik.config_token: when set, GET /traefik-config requires
"Authorization: Bearer <token>" (constant-time compare). Unset keeps the
old behaviour and logs a warning once. The installer now generates the
token and writes it to config.yml and Traefik's HTTP provider headers.
- Migration notes for 1.28.0 cover the config change and a query for
existing targets that will stop routing.
PAN-1885 / GHSA-jrw8, rx89 part of PAN-1799
Pangolin consults the IdP only at login and keeps its own session
afterwards, so disabling a user or revoking their sessions in the IdP
does not end their Pangolin sessions.
Store the IdP refresh token at OIDC login as a grant and redeem it at
most every server.idp_session_revalidation_minutes (default 5). If the
IdP rejects it with invalid_grant, the grant is marked revoked and all
sessions backed by it and their resource sessions are deleted. Other
errors (IdP unreachable or slower than 10 seconds, invalid_client after
a secret change) keep the sessions valid and are retried after at most
a minute instead of on every request.
Only the instance holding a lease on the grant in the primary database
redeems its refresh token, and it writes the result only while it still
holds the lease, so instances never redeem the same token concurrently.
The per-request lookup reads from a replica through safeRead.
Device logins of the Pangolin clients share the grant of the browser
session that approved them, read from the primary database, so a rotated
refresh token is never redeemed twice by separate sessions.
The Entra ID provider type hardcodes its scopes, so it now requests
offline_access to get a refresh token.
Backup names were built inline from Date#getMonth, which is zero-indexed, so a
backup taken on 12 September 2026 was written as db_2026-8-12_20-35-56.sqlite.
No field was zero-padded either, giving names like db_2026-8-12_20-36-2.sqlite.
Extract formatBackupTimestamp into server/lib and use it from both places that
built the string: the backupDb helper in migrationsSqlite.ts and the inline copy
in the 1.0.0-beta9 setup script. Padding every field also makes the names sort
lexicographically in the order the backups were taken.
Adds tests covering both reported names, single-digit padding and sort order.
Reverting the helper to the old formula fails them with the exact name from the
report.