Skip to content

Security: stop trusting the first host name while no password is set - #485

Merged
SandObserver merged 1 commit into
mainfrom
security/no-auto-trust-first-host
Oct 18, 2026
Merged

SandObserver merged 1 commit into
mainfrom
security/no-auto-trust-first-host

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Remove the first-visit step in refusedHost that saved the Host of the first GET /api/auth/check into settings.server.allowedHosts. With no password set, only local addresses and names already in the list are answered.
  • Drop the unused path argument from refusedHost and its call in the router.
  • Remove the dashboard boot retry of /api/config, /api/widgets and /api/icons/local after a 403, which only covered requests sent before the first-visit step.

Testing
All green, including e2e. Replaced the first-visit tests with a rebound page that loads first and an owner adding a name from an IP address.

Changelog

Security

  • Stop trusting the first host name that opens Stackyard while no password is set. Add a domain name in Allowed Addresses from an IP address or a local name.

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.

The API no longer stores the Host of the first GET /api/auth/check as an
allowed address. A rebound page could send that request before the owner,
register its own name and then set the password. Names are added only in
Settings, from an IP address or a local name.

Remove the dashboard boot retry for requests refused before that check.
@SandObserver SandObserver added the security Security fix label Oct 18, 2026
@SandObserver
SandObserver merged commit 1bff2ce into main Oct 18, 2026
6 checks passed
@SandObserver
SandObserver deleted the security/no-auto-trust-first-host branch October 18, 2026 04:34
stackyard-release Bot pushed a commit that referenced this pull request Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security Security fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant