diff --git a/src/server/lib/rate-limit/keys.ts b/src/server/lib/rate-limit/keys.ts index 2f10db9f4..1e157e10b 100644 --- a/src/server/lib/rate-limit/keys.ts +++ b/src/server/lib/rate-limit/keys.ts @@ -15,7 +15,7 @@ const getRateLimitKey = ( ) => `gw-rl-${route}-${bucketName}${value ? '-' + sha256(value) : ''}`; const removeEmailAlias = (email?: string) => { - const removalRegex = /\+.*@/g; + const removalRegex = /\+[^@]*@/g; return email?.replace(removalRegex, '@'); };