feat: manual update via tarball + signature upload #197
Reference in New Issue
Block a user
Delete Branch "feature/manual-update-upload"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds a "Manuelles Update" panel on the Backup view. Admin picks a
.tar.gz+ matching.tar.gz.sigfrom disk, server verifies the Ed25519 signature against the hardcoded public key before extraction, then installs and runsocc upgrade.Motivation: the automatic Gitea fetch sometimes can't reach the repo (mobile hotspot, captive portal, corporate firewall, air-gapped instance). This gives an offline-friendly path with identical security guarantees.
Security
Not a new attack surface — trust model is identical to the automated path:
sodium_crypto_sign_verify_detached()against the embeddedPUBLIC_KEYconstantAuthorizationMiddleware), CSRF protection inherited fromApiController(noNoCSRFRequiredattribute on the new route)SODIUM_CRYPTO_SIGN_BYTES(64)tempnam+chmod 0600, cleaned up in afinallyblockBoth paths now funnel through a single
applyVerifiedUpdate()critical section, so there's no divergence in how signature verification → extraction →occ upgradeare ordered.Test plan
SelfUpdateSignatureTestwhich covers the shared verification logic)🤖 Generated with Claude Code