Commit Graph
7 Commits
Author SHA1 Message Date
DrSmoothl 7c0519f75f lint 2026-10-12 15:43:34 +08:00
DrSmoothl 8940f8864b fix(config): protect operator credentials
Keep first-run access details confined to the active process console and remove development credentials from managed application logs.

Treat notification delivery settings as sensitive during backup and restore, preserve private file access across creation and updates, and align the WebUI guidance with the new boundary.
2026-08-01 17:02:39 +08:00
DrSmoothl ea841d929e fix(webui): make listener exposure explicit
Use a local-only default while preserving saved operator choices and keeping broader network access available from the settings panel.

Treat enabled encrypted transport as a startup requirement and present a dismissible notice when remote browser access is not protected.
2026-08-01 16:50:08 +08:00
DrSmoothl 87a604ecbd feat(storage): add managed storage controls
Enforce a global log quota with configurable retention and observable degradation. Add authenticated storage reporting and safe cleanup controls to the settings UI. Protect active stream transfers and isolate parallel test resources.
2026-07-24 12:58:57 +08:00
DrSmoothl 2fea3ca4d9 feat(core): validate backup restores before mutation
Route selected backup entries through owner-owned config parsers before any filesystem write. Reject unsupported paths, mismatched encodings, malformed base64, lossy normalization, invalid effective overlays, and decoded payloads larger than 32 MiB.

Treat WebUI state, private keys, and every OneBot config as a single sensitive group. Skip unselected sensitive entries without inspecting their contents, preserve recognized migrations, and assign restrictive modes to credential files.
2026-07-15 16:11:44 +08:00
DrSmoothl d2e8222886 fix(webui): A2 backup — per-uin onebot config, no-store, atomic restore
Adversarial Wave A2 pass, 3 MAJORs:
- #3/#3b: the allowlist missed per-account config/onebot_<uin>.json (the file
  that actually carries each account's network config + OneBot access token).
  Add it via an /^onebot_\d+\.json$/ pattern; classify ALL onebot config
  (global + per-uin) as credential since it holds the access token — a
  no-credentials backup no longer leaks tokens. Export scans config/ for them.
- #6: GET export could carry the private key/hash; add Cache-Control: no-store
  + Pragma so the response is never cached.
- #4: refactor applyBackup → pure planRestore + a two-phase atomic restore in
  server.ts (snapshot → stage all .tmp → rename all), so a staging failure
  leaves the live config untouched; clean up stray tmp on failure.
2026-06-18 15:08:51 +08:00
DrSmoothl b71aedaa60 feat(webui): config backup/restore core (Wave A2)
Pure, tested backup module: buildBackup (allowlist → JSON bundle, credential
files gated), validateBackup (version/app/known-filename/no-traversal/entry
shape — rejects wholesale), applyBackup (snapshot-then-write, skips
credentials unless opted in). Credentials = webui.json + key.pem; cert.pem is
public and always travels. fs glue lands next in server.ts.
2026-06-18 14:56:12 +08:00