The minimalistic document archiving platform.
fix(intake-emails): enforce length requirement for webhook secret (#892)
Corentin Thomasset1c1d273fbdd7
diff --git a/.changeset/poor-planes-enjoy.md b/.changeset/poor-planes-enjoy.mdnew file mode 100644index 00000000..3887b200--- /dev/null+++ b/.changeset/poor-planes-enjoy.md@@ -0,0 +1,5 @@+---+"@papra/app": patch+---++Enforced the length of the intake email webhook secret (`INTAKE_EMAILS_WEBHOOK_SECRET`) to be between 16 and 128 characters to match the OwlRelay API validation requirements.diff --git a/apps/papra-server/src/modules/intake-emails/intake-emails.config.ts b/apps/papra-server/src/modules/intake-emails/intake-emails.config.tsindex 1f88944d..0216170d 100644--- a/apps/papra-server/src/modules/intake-emails/intake-emails.config.ts+++ b/apps/papra-server/src/modules/intake-emails/intake-emails.config.ts@@ -15,9 +15,9 @@ export const intakeEmailsConfig = {env: 'INTAKE_EMAILS_IS_ENABLED',},webhookSecret: {- doc: 'The secret to use when verifying webhooks',- schema: z.string(),- default: 'change-me',+ doc: 'The secret to use when verifying webhooks, should be a random string between 16 and 128 characters',+ schema: z.string().min(16).max(128),+ default: 'please-change-me',env: 'INTAKE_EMAILS_WEBHOOK_SECRET',},driver: {