mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-01 12:29:35 +01:00
Should allow non http referrers. Closes #2831
This commit is contained in:
parent
72b3b6158a
commit
082a751ffe
@ -121,7 +121,7 @@ export default async (req: NextApiRequestCollect, res: NextApiResponse) => {
|
||||
urlPath = '/';
|
||||
}
|
||||
|
||||
if (referrerPath?.startsWith('http')) {
|
||||
if (/^[\w-]+:\/\/\w+/.test(referrerPath)) {
|
||||
const refUrl = new URL(referrer);
|
||||
referrerPath = refUrl.pathname;
|
||||
referrerQuery = refUrl.search.substring(1);
|
||||
|
Loading…
Reference in New Issue
Block a user