Security & privacy
Security model
- Album access — albums live at
/a/{slug}. The slug is 10 random characters from a 31-letter alphabet (~50 bits) and cannot be enumerated. Drafts are invisible to everybody except owner and admins. - Password albums — passwords are stored as scrypt hashes. A correct password sets a signed cookie bound to the album's
passwordVersion; changing the password invalidates all unlock cookies. Minimum length is 6 characters. Attempts are limited per visitor (10 per 10 minutes, client IP viaWAYFARE_TRUSTED_PROXIES); beyond 100 attempts per album, every attempt is slowed down instead of blocking legitimate guests. Limits are kept in memory per process. - Revocation — rotating the slug invalidates every QR code and link at once — including media URLs that were already handed out (signatures are bound to slug and
passwordVersion). Expiry dates are enforced on every request. - Media delivery — photos are only served through
/api/media/{photoId}/{variant}?exp&sig(HMAC-signed, short TTL) after re-checking album access. Originals are delivered only if the owner allows downloads. Responses useCache-Control: private. - Download protection — see the user guide for what it does and where it ends: screenshots cannot be prevented.
- Authorisation is enforced in the service layer, not only in pages. Roles: viewer < owner < admin.
- Secrets — Google tokens for photo sources are encrypted with AES-256-GCM using a key derived from
WAYFARE_SECRET. Rotating the secret invalidates sessions and stored connections. - Cloud rules —
firestore.rulesandstorage.rulesdeny all client access; the server uses the Admin SDK. - Headers —
X-Content-Type-Options,X-Frame-Options: DENY, strictReferrer-Policy, restrictivePermissions-Policy; album pages sendnoindex. - Uploads are re-encoded by
sharp(no raw user files are served except the stored original when downloads are allowed) and size-limited. Permissions,Originand the declaredContent-Lengthare checked before the body is read; at most 10 files per request. Guest uploads are serialised per guest so parallel requests cannot exceed the per-guest limit (per process). - Watermark — applied to the large display image only; the small grid thumbnails (max. 480 px) stay clean on purpose.
- Sign-in — e-mail/password accounts must confirm their address; magic links are disabled in production without SMTP, so sign-in links never end up in logs.
- Cron endpoint requires the
CRON_SECRETbearer token.
Operator checklist
- [ ] HTTPS everywhere (reverse proxy),
WAYFARE_BASE_URLis the https URL - [ ] Long random
WAYFARE_SECRET,.envnot world-readable, not in git - [ ] Backups of database and blobs, tested restore
- [ ] Keep Docker image and dependencies updated (Dependabot is configured in the repo)
- [ ] Limit admins to people you trust
- [ ] Private bucket for S3
Found a vulnerability? Please report it privately — see SECURITY.md.
Privacy and GDPR notes
Not legal advice
The following are technical measures that help with privacy. Whether your setup is compliant depends on your situation; consult a lawyer or data-protection officer if in doubt.
- No tracking. No analytics, no advertising, no third-party scripts. Album views are counted anonymously with a one-way hash per day, without IP addresses.
- Self-hosted fonts (
@fontsource) — no requests to Google Fonts or any CDN. The only exception is the Google Drive Picker script, loaded only when an owner opens it. - EXIF/GPS removed. Thumbnails and display versions carry no metadata. Originals are kept untouched and only delivered with download permission — tell owners.
- Cookies — only functional cookies (session, album unlock, language). No consent banner is needed for strictly necessary cookies, but check your local law.
- Legal pages — admins edit the imprint and privacy policy (Markdown) in /admin → Settings. The footer links to them when filled. You are responsible for their content: name the controller, list the processors (hosting provider, SMTP provider, Google if import/login is used, Firebase if used), purposes and retention.
- Data subject rights — users can delete their own account (Account → Delete), which removes albums, photos, comments, reactions, connections, sessions and passkeys. Admins can ban users and export/delete data on request via the admin area and database.
- Data processing agreements — if you use Firebase/Google Cloud, S3 providers or an SMTP provider, conclude the providers' DPAs and choose EU regions where required.
- Children and sensitive photos — baby and memorial albums contain personal data; recommend a password and an expiry date to owners.