From 18a3c06a9eb3b2e250ab51ca80390f55e90e38d7 Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Thu, 14 Dec 2023 23:57:00 +0000 Subject: [PATCH] url: always strip username, password, port, fragment --- src/modules/processing/url.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/processing/url.js b/src/modules/processing/url.js index a7f35f2d..246d9620 100644 --- a/src/modules/processing/url.js +++ b/src/modules/processing/url.js @@ -60,9 +60,11 @@ export function cleanURL(url) { } if (stripQuery) { - url.search = url.hash = '' + url.search = '' } + url.username = url.password = url.port = url.hash = '' + if (url.pathname.endsWith('/')) url.pathname = url.pathname.slice(0, -1);