furtka/furtka
Daniel Maksymilian Syrnicki 20f6398abf fix(api): refuse path-like app names, validate settings before writing .env, harden the HTTP server
- app names from URL paths and JSON bodies must match APP_NAME_RE; installer
  remove()/update_env() check it too. Before, {"name": ".."} or "/" sent
  remove() into shutil.rmtree on /var/lib/furtka or the root filesystem
- manifests must carry a valid app name as well
- settings are validated in memory (placeholders, system paths, line breaks)
  before .env is written — a rejected /etc used to be saved anyway
- values containing $ are single-quoted so compose doesn't expand them
  ("pa$word" became "pa"); line breaks are refused (env injection)
- ThreadingHTTPServer so status polls keep answering during slow requests;
  state-changing POSTs still run one at a time
- 1 MiB body cap, 30 s socket timeout, bad Content-Length → 400
- POSTs with Sec-Fetch-Site other than same-origin are refused (apps on
  other ports of the same host count as same-site for SameSite=Strict)
- unexpected exceptions return a JSON 500 instead of a dropped connection
- UI pages send the browser to /login on a 401 instead of showing an empty
  app list after an API restart

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wq1hzUp4ZmCKHDuLKCnu73
2026-09-28 13:04:09 +02:00
..
__init__.py feat(furtka): resource-manager skeleton — manifest, scanner, CLI 2026-04-15 09:59:41 +02:00
_release_common.py feat(catalog): on-box apps catalog synced independently of core version 2026-04-20 14:16:02 +02:00
api.py fix(api): refuse path-like app names, validate settings before writing .env, harden the HTTP server 2026-09-28 13:04:09 +02:00
auth.py feat(auth): rate-limit failed logins with per-(user, IP) lockout 2026-04-22 17:27:14 +02:00
catalog.py fix(catalog): retry the boot-time sync and record failures as an error stage 2026-08-25 16:38:06 +02:00
cli.py fix(cli): fire on_install hooks on named CLI installs 2026-06-28 13:03:33 +02:00
deps.py chore: ruff format 2026-05-11 20:10:04 +02:00
dockerops.py chore: ruff format 2026-05-11 20:10:04 +02:00
https.py fix(https): make HTTPS opt-in to stop the BAD_SIGNATURE trap on fresh installs 2026-04-21 19:30:04 +02:00
install_runner.py chore: ruff format 2026-05-11 20:10:04 +02:00
installer.py fix(api): refuse path-like app names, validate settings before writing .env, harden the HTTP server 2026-09-28 13:04:09 +02:00
manifest.py fix(api): refuse path-like app names, validate settings before writing .env, harden the HTTP server 2026-09-28 13:04:09 +02:00
passwd.py fix: unbreak upgrade path + install-lock race 2026-04-21 17:03:28 +02:00
paths.py fix: auth-guard / and /settings, add Logout link to static navs 2026-04-21 18:16:42 +02:00
reconciler.py fix(deps): give on_start hooks the consumer's stored credentials 2026-05-28 23:45:42 +02:00
scanner.py fix(furtka): audit follow-ups — placeholder secrets, isolate reconcile, .env perms 2026-04-15 10:17:00 +02:00
sources.py feat(catalog): on-box apps catalog synced independently of core version 2026-04-20 14:16:02 +02:00
updater.py fix(updater): start newly linked timers and link units via current; bench test report 2026-08-26 09:46:13 +02:00