Skip to content

2.7.1

Choose a tag to compare

@sevagjb sevagjb released this 20 Nov 16:31
· 45 commits to main since this release
d491a70

A hardening release that finishes the security review started in 2.6.1. Nothing changes in daily use, and nothing has to be done after updating.

Changes

  • Runs as a normal user, not root. docker-entrypoint.sh gives /data to user tilemark (1000:1000, or PUID/PGID) and then drops all root rights with setpriv --no-new-privs. It only changes files that don't belong to that user yet, so starts after the first one stay fast. If the folder's owner can't be changed (some NFS/SMB shares), TileMark keeps running as root and logs that. docker exec tilemark python app.py reset-login / setup-code switch to the data folder's owner first, so they never leave root-owned database files behind.
  • Security headers. A Content-Security-Policy that allows each page's inline script by its hash (worked out at start), so no other script can run. Also frame-ancestors 'self' / X-Frame-Options: SAMEORIGIN, nosniff and Referrer-Policy: same-origin. The HA sidebar (ingress) is on the same origin, so it keeps working. The new FRAME_ANCESTORS option allows other addresses for anyone who embeds TileMark on purpose.
  • Upload limits. 25 MB by default (card pictures stay at 20 MB), 100 MB for imports and 500 MB for restores; before, everything allowed up to 1 GB. Only one upload over 25 MB is handled at a time, and the others get a 429. A file that's too large gets a translated message.
  • Picture formats. Pillow opens only JPEG, PNG, WebP, GIF, ICO and AVIF.
  • NAT64 / 6to4. Both are judged by their embedded IPv4 address. 2002:7f00:1:: is now refused even when local fetching is on. On IPv6-only networks with NAT64, public sites work again (before, 64:ff9b::/96 counted as reserved and was blocked).
  • Admin-privacy wording. The Settings hint (in all six languages) and the guide no longer claim the admin can't see links. A new section, What an admin can do, explains password reset, daily backups and data-folder access.
  • Docs: Accounts and security (new sections: what an admin can do, uploads, container user, browser rules, NAT64), Getting started (PUID, PGID, FRAME_ANCESTORS, update note), FAQ, Links and groups, Home Assistant pages, both READMEs, the website's landing page, CHANGELOG (2.7.1) and ROADMAP.

Checked

  • pytest: 221 passed (21 new: headers and CSP hashes, the frame option, upload limits and the one-at-a-time rule, picture formats, NAT64/6to4, image user, privacy wording).
  • Ran gunicorn through the entrypoint as root against a root-owned data folder. The process ran as uid 1000 with NoNewPrivs: 1 and no capabilities, and the files were handed over. Also checked PUID/PGID, a non-root start, the fallback when chown fails, and the CLI.
  • Headless Chrome against the live app: setup, adding a link, the Settings 2FA QR code, an uploaded card picture, the blob preview in the edit window and the save page all work with no CSP violations.
  • The image itself couldn't be built here (no access to Docker Hub), so the CI build is the first real image build. After merging, please try :edge on an existing install before tagging v2.7.1.