Skip to content

security: reject weak/default PASTE_AUTH_SECRET in production #65

Description

@ArianAr

Problem

Compose defaults PASTE_AUTH_SECRET to the public placeholder change-me-in-production-use-a-long-random-string. Production starts because any non-empty secret is accepted. Attackers who know the default can forge pc_auth_<id> HMAC unlock cookies and read password-protected pastes without the password.

Acceptance

  • Production refuses empty and known placeholder secrets
  • Compose does not ship a working default secret (require explicit env)
  • Docs/README still show how to set a strong secret
  • Unit tests for getPasteAuthSecret placeholder rejection

Test plan

  • pnpm test / lint / typecheck / build

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:dockerDocker / self-host packagingarea:serverNext.js server / APIbugSomething isn't workingpriority:highImportant; schedule soonsecuritySecurity-related issue or fix (non-advisory tracking)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions