feat(Security): fixes

This commit is contained in:
alam00000 committed 2026-04-18 16:58:55 +05:30
1 parent b040aef729
commit 7527187812
8 files changed
+371 -156

No files matched your search

+8 -1
View File
@@ -720,7 +720,14 @@ async function handleMultiFileUpload(toolId: string) {
'w-full h-36 sm:h-40 md:h-44 bg-gray-900 rounded-md border-2 border-gray-600 flex items-center justify-center overflow-hidden';
const img = document.createElement('img');
img.src = url;
try {
const parsed = new URL(url);
if (parsed.protocol === 'blob:') {
img.src = parsed.href;
}
} catch {
console.warn('Invalid blob URL for preview');
}
img.className = 'max-w-full max-h-full object-contain';
const p = document.createElement('p');