The E2E caught a real leak: a non-nsfw (even anonymous) account could download an adult artifact. In PocketBase, file protection is a per-FIELD flag, not derived from the collection view rule — the original migration left releases.file unprotected, so its URL was public despite the gated read rules. - Add protected:true to the file field (correct for fresh installs). - 1786500001_releases_protect_file.js: alter the field on the already-deployed instance (applied migrations don't re-run, so the fix needs its own migration). - Doc: correct the gating explanation (protection is the field flag; the file token grant then re-checks the view rule). With this, a protected file needs a file token whose grant re-checks the view rule, so a clean account is denied the adult artifact.
8 lines
206 B
Text
8 lines
206 B
Text
# PocketBase runtime data (DB, uploaded files, logs) — never commit.
|
|
pb_data/
|
|
|
|
# Local env / secrets
|
|
.env
|
|
.env.local
|
|
# Local-only secrets (e.g. a minted superuser token for admin scripting)
|
|
*.local.token
|