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

fix(security): encode company-switch action ID

davoodmehraban89 committed Oct 31, 2026 at 00:38 UTC e145a5e5e2aaa41725b76aa24d2318b3fd76cfbd
1 file changed +1 -1
src/views/SettingsView.js
+1 -1
@@ -898,7 +898,7 @@ class SettingsViewImpl {
898 // ============================================================
899 async openCompanySwitcher() {
900 const companies = await globalThis.FINORA.Company.list();
901 - const body = companies.map(c => `<button class="btn" style="width:100%;margin:4px 0" onclick="window.SettingsView.selectCompany('${c.id}')">${this._esc(c.name || 'شرکت')}</button>`).join('');
901 + const body = companies.map(c => `<button class="btn" style="width:100%;margin:4px 0" onclick="window.SettingsView.selectCompany(${this._esc(JSON.stringify(String(c.id ?? '')))})">${this._esc(c.name || 'شرکت')}</button>`).join('');
902 Modal.open({ title: 'تغییر شرکت فعال', body: body || '<div class="empty-mini">شرکتی یافت نشد</div>', footer: '', size: 'sm' });
903 }
904