fix(security): wiro ssrf

This commit is contained in:
Mehmet INCE
2026-03-25 16:31:13 +00:00
parent 30a8f0470e
commit 66de14d3cf
+3 -6
View File
@@ -185,12 +185,9 @@ export const wiroGeneratorPlugin: MediaGeneratorPlugin = {
}
if (request.inputImageUrl) {
// Fetch the image and add it to the form
const imageResponse = await fetch(request.inputImageUrl);
if (imageResponse.ok) {
const imageBlob = await imageResponse.blob();
formData.append("inputImage", imageBlob, "input.jpg");
}
// Pass the URL to Wiro instead of fetching server-side to avoid SSRF.
// Wiro's API natively supports inputImageUrl for fileinput parameters.
formData.append("inputImageUrl", request.inputImageUrl);
}
const response = await fetch(url, {