From dc2fde0a75e1e3884671d73e798c52e7240a57a7 Mon Sep 17 00:00:00 2001 From: Namekuji Date: Fri, 18 Aug 2023 06:22:51 -0400 Subject: [PATCH] fix: remove brackets --- packages/backend/src/services/drive/upload-from-url.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/services/drive/upload-from-url.ts b/packages/backend/src/services/drive/upload-from-url.ts index abbefbbf6b..0638bcab89 100644 --- a/packages/backend/src/services/drive/upload-from-url.ts +++ b/packages/backend/src/services/drive/upload-from-url.ts @@ -38,7 +38,7 @@ export async function uploadFromUrl({ const parsedUrl = new URL(url); if ( process.env.NODE_ENV === "production" && - isPrivateIp(parsedUrl.hostname) + isPrivateIp(parsedUrl.hostname.replaceAll(/(\[)|(\])/g, "")) ) { throw new Error("Private IP is not allowed"); }