Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Railway template doesn't validate/generate DATABASE_ENCRYPTION_KEY in correct format, causing cryptic failure only surfaced when password-protecting a video

Aperta
#2,114 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Ambito
backend, cloud, devops

Direzione di ricerca

Inizia con il template one-click di Railway e la configurazione di avvio del server; verifica come viene generata, descritta e controllata DATABASE_ENCRYPTION_KEY rispetto al formato richiesto di 32 byte. Il lavoro è completato quando i valori non validi producono un errore immediato con un messaggio chiaro e il template fornisce o descrive un valore esadecimale valido di 64 caratteri usando il comando openssl indicato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description
Deploying Cap via the official Railway one-click template can leave DATABASE_ENCRYPTION_KEY set to an invalid length/format with no validation or clear error at deploy time or server startup. The failure only surfaces later, when a user tries to password-protect a video, producing a cryptic server error:

Error verifying video password: Error: Encryption failed: Invalid encryption key format: Encryption key must be 32 bytes (64 hex characters)

This is the same underlying issue as #1357, which was closed after the reporter regenerated their key with openssl rand -hex 32. That fixed their case, but the root gap remains: nothing catches or explains an invalid key until a user happens to exercise the one feature (video passwords) that touches it.

Suggested improvements

  1. Validate DATABASE_ENCRYPTION_KEY format at server startup and fail fast with a clear error, rather than only failing when a specific feature is used.
    1. If the Railway template auto-generates this variable, confirm the generator produces a 64-character hex string (32 bytes) — a mismatched generator (e.g., a generic 32-character secret generator) would explain why this keeps recurring.
    1. Surface the exact fix command (openssl rand -hex 32) directly in the Railway template's deploy-time variable description, not just in the general self-hosting docs.
      Environment
      Deployment: Self-hosted via Railway one-click template (ghcr.io/capsoftware/cap-web:latest)

Related issues
Related to #1357

Lingua principale
Rust
Stelle
22.5k
Fork
1.9k
Merge medio
7h 43m
PR unite (30g)
80

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CapSoftware/Cap

Tutte le issue di CapSoftware/Cap

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.