Skip to content

Commit d4ef6e8

Browse files
authored
fix: Make identifier for rate limit URL safe (calcom#25111)
1 parent cddd8d7 commit d4ef6e8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/web/middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const middleware = async (req: NextRequest): Promise<NextResponse<unknown>> => {
101101
try {
102102
await checkRateLimitAndThrowError({
103103
rateLimitingType: "common",
104-
identifier: `${req.nextUrl.pathname}-${piiHasher.hash(requestorIp)}`,
104+
identifier: `${encodeURIComponent(req.nextUrl.pathname)}-${piiHasher.hash(requestorIp)}`,
105105
});
106106
} catch (error) {
107107
if (error instanceof HttpError) {

0 commit comments

Comments
 (0)