File tree 1 file changed +4
-3
lines changed
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';
10
10
import { secret , uuid , hash } from '@/lib/crypto' ;
11
11
import { COLLECTION_TYPE } from '@/lib/constants' ;
12
12
import { anyObjectParam , urlOrPathParam } from '@/lib/schema' ;
13
+ import { safeDecodeURI , safeDecodeURIComponent } from '@/lib/url' ;
13
14
import { createSession , saveEvent , saveSessionData } from '@/queries' ;
14
15
15
16
const schema = z . object ( {
@@ -168,12 +169,12 @@ export async function POST(request: Request) {
168
169
websiteId,
169
170
sessionId,
170
171
visitId,
171
- urlPath,
172
+ urlPath : safeDecodeURI ( urlPath ) ,
172
173
urlQuery,
173
- referrerPath,
174
+ referrerPath : safeDecodeURI ( referrerPath ) ,
174
175
referrerQuery,
175
176
referrerDomain,
176
- pageTitle : title ,
177
+ pageTitle : safeDecodeURIComponent ( title ) ,
177
178
eventName : name ,
178
179
eventData : data ,
179
180
hostname : hostname || urlDomain ,
You can’t perform that action at this time.
0 commit comments