From b48f8327cda678a1a523c8a7800fee7d748b1746 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Tue, 31 Oct 2023 07:52:34 +0000 Subject: [PATCH] fix(nextjs): Strictly validate tunnel target parameters --- packages/nextjs/src/config/withSentryConfig.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nextjs/src/config/withSentryConfig.ts b/packages/nextjs/src/config/withSentryConfig.ts index 07a22a815ade..48afb25f8dc3 100644 --- a/packages/nextjs/src/config/withSentryConfig.ts +++ b/packages/nextjs/src/config/withSentryConfig.ts @@ -104,12 +104,12 @@ function setUpTunnelRewriteRules(userNextConfig: NextConfigObject, tunnelPath: s { type: 'query', key: 'o', // short for orgId - we keep it short so matching is harder for ad-blockers - value: '(?.*)', + value: '(?[a-fA-F0-9]*)', }, { type: 'query', key: 'p', // short for projectId - we keep it short so matching is harder for ad-blockers - value: '(?.*)', + value: '(?\\d*)', }, ], destination: 'https://o:orgid.ingest.sentry.io/api/:projectid/envelope/?hsts=0',