Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix: guard generic webhook secret normalization

Tin95e166ca9f3b
diff --git a/apps/api/src/plugins/generic-webhook/config.ts b/apps/api/src/plugins/generic-webhook/config.ts
index 3706dbae5..b1ddb6b4b 100644
--- a/apps/api/src/plugins/generic-webhook/config.ts
+++ b/apps/api/src/plugins/generic-webhook/config.ts
@@ -68,9 +68,14 @@ export const defaultGenericWebhookEvents: Record<
export function normalizeGenericWebhookConfig(
config: GenericWebhookConfig,
): GenericWebhookConfig {
+ const secret =
+ typeof config.secret === "string"
+ ? config.secret.trim() || undefined
+ : undefined;
+
return {
...config,
- secret: config.secret?.trim() || undefined,
+ secret,
health: config.health
? {
...config.health,