From c5ad42480c28ddff3d46672e0d5dc59d823030ec Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 11:49:36 +0000 Subject: [PATCH] Changes Co-authored-by: Reifonas <211114984+Reifonas@users.noreply.github.com> --- src/components/CloudLoader.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/CloudLoader.tsx b/src/components/CloudLoader.tsx index 6b82903..e3e399f 100644 --- a/src/components/CloudLoader.tsx +++ b/src/components/CloudLoader.tsx @@ -119,6 +119,14 @@ export function CloudLoader({ compact = false, variant = 'outline', className }: const response = await smartFetch(rawUrl); const buffer = await response.arrayBuffer(); + // Valida tamanho + assinatura antes de converter + const sig = validateModelFile(fileName, buffer.byteLength, ext, buffer); + if (!sig.ok) { + toast.error(sig.reason!); + if (sig.detail) console.warn('[validateModelFile]', sig.detail); + return; + } + let blob: Blob, outName = fileName, outSize = buffer.byteLength; if (ext === 'glb') { blob = new Blob([buffer], { type: 'model/gltf-binary' });