From afe29c61cc8597d263bf1e90494731ca27fafa6f Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 19 Apr 2025 22:43:16 +0300 Subject: [PATCH] Use getHostFromUrl for error log --- src/endpoints/content-manager.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/endpoints/content-manager.js b/src/endpoints/content-manager.js index 7102637f5..99f9c4997 100644 --- a/src/endpoints/content-manager.js +++ b/src/endpoints/content-manager.js @@ -710,8 +710,7 @@ router.post('/importURL', async (request, response) => { type = 'character'; result = await downloadGenericPng(url); } else { - const receivedURL = new URL(url); - console.error(`Received an import for "${receivedURL.host}", but site is not whitelisted. This domain must be added to the config key "whitelistImportDomains" to allow import from this source.`); + console.error(`Received an import for "${getHostFromUrl(url)}", but site is not whitelisted. This domain must be added to the config key "whitelistImportDomains" to allow import from this source.`); return response.sendStatus(404); }