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"); }