From 3ba9f9a8795a224e315b0465940ab4a3c20d1ca8 Mon Sep 17 00:00:00 2001 From: Samyak Piya Date: Tue, 24 Dec 2024 14:29:31 -0500 Subject: [PATCH] fix(webhooks-fe): trim webhook secret on input Removes leading and trailing whitespace from webhook secrets to prevent validation issues. --- .../webhooks/components/SettingsDevelopersWebhookDetail.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/twenty-front/src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx b/packages/twenty-front/src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx index 217802a04568..fffc1228865e 100644 --- a/packages/twenty-front/src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx +++ b/packages/twenty-front/src/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail.tsx @@ -1,3 +1,4 @@ +import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile'; import styled from '@emotion/styled'; import { useMemo, useState } from 'react'; import { useNavigate, useParams } from 'react-router-dom'; @@ -14,7 +15,6 @@ import { Section, useIcons, } from 'twenty-ui'; -import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile'; import { AnalyticsActivityGraph } from '@/analytics/components/AnalyticsActivityGraph'; import { AnalyticsGraphEffect } from '@/analytics/components/AnalyticsGraphEffect'; @@ -303,7 +303,7 @@ export const SettingsDevelopersWebhooksDetail = () => { placeholder="Write a secret" value={secret} onChange={(secret: string) => { - setSecret(secret); + setSecret(secret.trim()); setIsDirty(true); }} fullWidth