Skip to content

Commit ddbda3c

Browse files
authored
fix(nextjs): Strictly validate tunnel target parameters (#9415)
1 parent 4371b2c commit ddbda3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/nextjs/src/config/withSentryConfig.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ function setUpTunnelRewriteRules(userNextConfig: NextConfigObject, tunnelPath: s
104104
{
105105
type: 'query',
106106
key: 'o', // short for orgId - we keep it short so matching is harder for ad-blockers
107-
value: '(?<orgid>.*)',
107+
value: '(?<orgid>[a-fA-F0-9]*)',
108108
},
109109
{
110110
type: 'query',
111111
key: 'p', // short for projectId - we keep it short so matching is harder for ad-blockers
112-
value: '(?<projectid>.*)',
112+
value: '(?<projectid>\\d*)',
113113
},
114114
],
115115
destination: 'https://o:orgid.ingest.sentry.io/api/:projectid/envelope/?hsts=0',

0 commit comments

Comments
 (0)