File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { createToken, parseToken } from '@/lib/jwt';
1010import { secret , uuid , hash } from '@/lib/crypto' ;
1111import { COLLECTION_TYPE } from '@/lib/constants' ;
1212import { anyObjectParam , urlOrPathParam } from '@/lib/schema' ;
13+ import { safeDecodeURI , safeDecodeURIComponent } from '@/lib/url' ;
1314import { createSession , saveEvent , saveSessionData } from '@/queries' ;
1415
1516const schema = z . object ( {
@@ -168,12 +169,12 @@ export async function POST(request: Request) {
168169 websiteId,
169170 sessionId,
170171 visitId,
171- urlPath,
172+ urlPath : safeDecodeURI ( urlPath ) ,
172173 urlQuery,
173- referrerPath,
174+ referrerPath : safeDecodeURI ( referrerPath ) ,
174175 referrerQuery,
175176 referrerDomain,
176- pageTitle : title ,
177+ pageTitle : safeDecodeURIComponent ( title ) ,
177178 eventName : name ,
178179 eventData : data ,
179180 hostname : hostname || urlDomain ,
You can’t perform that action at this time.
0 commit comments