فینورا پرو - سامانه جامع حسابداری و صدور فاکتور

test(security): require sanitized unknown invoice types

davoodmehraban89 committed Oct 31, 2026 at 00:23 UTC 1e41762b22c58c5394cae0b43b9c39fe798af2fa
1 file changed +2
tests/ui-control-structure.test.mjs
+2
@@ -158,6 +158,8 @@ test('A03: financial list views encode imported record IDs and textual values',
158 assert.doesNotMatch(source,/<option value="\$\{(?:[a-zA-Z]+)\.id\}"/,
159 name+' still interpolates raw IDs into option attributes');
160 }
161 + const invoice=fs.readFileSync(path.join(root,'src','views','InvoicesView.js'),'utf8');
162 + assert.ok(invoice.includes('${this._esc(k.label)}'), 'unknown imported invoice kind is not HTML escaped');
163 const expenses=fs.readFileSync(path.join(root,'src','views','ExpensesView.js'),'utf8');
164 assert.ok(expenses.includes('this._esc(JSON.stringify(String(e.id ??')));
165 });