mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 13:47:15 +01:00
Use safe URI decoding.
This commit is contained in:
parent
a509336bef
commit
b3cad83f08
3 changed files with 6 additions and 4 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import clickhouse from 'lib/clickhouse';
|
||||
import { CLICKHOUSE, PRISMA, runQuery } from 'lib/db';
|
||||
import prisma from 'lib/prisma';
|
||||
import { safeDecodeURIComponent } from 'next-basics';
|
||||
|
||||
export async function getUTM(
|
||||
...args: [
|
||||
|
|
@ -99,7 +100,7 @@ function parseParameters(data: any[]) {
|
|||
|
||||
for (const [key, value] of searchParams) {
|
||||
if (key.match(/^utm_(\w+)$/)) {
|
||||
const name = decodeURIComponent(value);
|
||||
const name = safeDecodeURIComponent(value);
|
||||
if (!obj[key]) {
|
||||
obj[key] = { [name]: +num };
|
||||
} else if (!obj[key][name]) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue