From 2ee780ec7a76530693f8c4ff86d283c3787ba130 Mon Sep 17 00:00:00 2001 From: keyan Date: Sun, 7 May 2023 10:02:23 -0500 Subject: [PATCH] prevent external subdomain redirect --- lib/url.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/url.js b/lib/url.js index 35d1a0fe..4b142542 100644 --- a/lib/url.js +++ b/lib/url.js @@ -6,7 +6,7 @@ export function ensureProtocol (value) { } export function isExternal (url) { - return !url.startsWith(process.env.PUBLIC_URL) && !url.startsWith('/') + return !url.startsWith(process.env.PUBLIC_URL + '/') && !url.startsWith('/') } export function removeTracking (value) {