Skip to content

fix(api): protect diagnose, series and EV detail on public hosts - #949

Open
frahlg wants to merge 1 commit into
masterfrom
agent/protect-heavy-reads
Open

fix(api): protect diagnose, series and EV detail on public hosts#949
frahlg wants to merge 1 commit into
masterfrom
agent/protect-heavy-reads

Conversation

@frahlg

@frahlg frahlg commented Aug 18, 2026

Copy link
Copy Markdown
Member

Summary

GET routes that are not the live dashboard now use the same local-or-token check as config and logs.

Newly protected: driver list and drafts, EV charger detail, series, planner diagnose, fleet-ping, notification rules, device-repository catalog/versions, app-link status.

Still open on purpose: status, energy, prices, plan, loadpoints, history. The dashboard polls loadpoints every 2s; protecting it would pop the house-password modal on every tick.

Test plan

  • go test ./internal/api (including the new guarded-read cases)
  • make verify on commit
  • Public-host GET /api/mpc/diagnose without token is 401
  • LAN GET /api/status and /api/loadpoints still 200

Those GET routes leaked more than the live dashboard. A published
hostname still serves status, energy, prices, plan, loadpoints and
history without a token.
@frahlg frahlg mentioned this pull request Aug 18, 2026
6 tasks
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