Skip to content

Commit 530cb94

Browse files
authored
fix: make identifier url safe 2 (calcom#25112)
* fix: Make identifier for rate limit URL safe * fix: Make identifier for rate limit URL safe using hasing
1 parent d4ef6e8 commit 530cb94

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: `${encodeURIComponent(req.nextUrl.pathname)}-${piiHasher.hash(requestorIp)}`,
104+
identifier: piiHasher.hash(`${req.nextUrl.pathname}-${requestorIp}`),
105105
});
106106
} catch (error) {
107107
if (error instanceof HttpError) {

0 commit comments

Comments
 (0)