furtka/assets/www
Daniel Maksymilian Syrnicki 22c2245ac4 fix(updater,auth): atomic symlink flip, roll back on any failure, fail closed on a damaged users.json
updater:
- /opt/furtka/current is swapped via rename() instead of unlink+symlink,
  so a power cut can't leave the box without a current version
- OSError after the flip (disk full writing the Caddyfile) now rolls back
  too; rollback restores the previous Caddyfile and reloads caddy +
  daemon-reload
- the health check keeps polling on read timeouts / RemoteDisconnected
  instead of escaping and skipping the rollback
- run_update writes an 'error' stage for any failure (download, sha,
  disk full); the settings page shows it instead of spinning on
  'Downloading…'

auth:
- users.json that exists but is empty/corrupt/unreadable raises instead of
  reading as 'no admin yet' — before, a truncated file made /login an open
  create-admin form for the whole LAN. /login answers 503 with SSH recovery
  steps instead
- save_users fsyncs before the rename
- first-run admin creation is serialised (threaded server)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wq1hzUp4ZmCKHDuLKCnu73
2026-09-28 13:11:42 +02:00
..
https-install feat(https): local HTTPS via Caddy tls internal + opt-in redirect toggle 2026-04-17 12:19:06 +02:00
settings fix(updater,auth): atomic symlink flip, roll back on any failure, fail closed on a damaged users.json 2026-09-28 13:11:42 +02:00
index.html fix(api): refuse path-like app names, validate settings before writing .env, harden the HTTP server 2026-09-28 13:04:09 +02:00
status.json fix(furtka): move assets/ to repo top level so Caddy + systemd find it 2026-04-16 15:26:10 +02:00
style.css feat(apps): app-to-app dependencies with install + start hooks 2026-05-11 19:39:10 +02:00