chore(security): fixes

This commit is contained in:
alam00000
2026-04-18 15:21:59 +05:30
parent 121de29d80
commit b040aef729
11 changed files with 59 additions and 33 deletions

View File

@@ -754,7 +754,8 @@ function renderField(field: FormField): void {
contentEl.appendChild(img);
} catch (error) {
console.warn(
`Failed to render barcode preview for field "${field.name}":`,
'Failed to render barcode preview for field:',
String(field.name).replace(/[\r\n]+/g, ' '),
error
);
contentEl.innerHTML = `<div class="flex flex-col items-center text-center p-1 text-gray-400"><i data-lucide="qr-code" class="w-6 h-6 mb-1"></i><span class="text-[10px] leading-tight">Invalid data</span></div>`;
@@ -2320,11 +2321,17 @@ downloadBtn.addEventListener('click', async () => {
if (existingField) {
radioGroup = existingField as PDFRadioGroup;
radioGroups.set(groupName, radioGroup);
console.log(`Using existing radio group from PDF: ${groupName}`);
console.log(
'Using existing radio group from PDF:',
String(groupName).replace(/[\r\n]+/g, ' ')
);
} else {
radioGroup = form.createRadioGroup(groupName);
radioGroups.set(groupName, radioGroup);
console.log(`Created new radio group: ${groupName}`);
console.log(
'Created new radio group:',
String(groupName).replace(/[\r\n]+/g, ' ')
);
}
}
@@ -2690,7 +2697,8 @@ downloadBtn.addEventListener('click', async () => {
pdfPage.drawImage(pngImage, { x, y, width, height });
} catch (e) {
console.warn(
`Failed to generate barcode for field "${field.name}":`,
'Failed to generate barcode for field:',
String(field.name).replace(/[\r\n]+/g, ' '),
e
);
}