فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
test(q01): reject executable markup in confirmation labels on installed Windows
davoodmehraban89 committed
Oct 30, 2026 at 23:58 UTC
25e3225df01a688df5ccd2252eab9dd72b909e67
1 file changed
+4
-1
tests/windows-vm-ui-interaction-audit-browser.js
+4
-1
@@ -291,10 +291,13 @@
291
// never be interpreted as HTML or create a DOM node with event handlers.
292
const hostileMessage='<img src=x onerror="window.Q01_INJECTED=true">';
293
FINORA.Modal.confirm({title:'Q01 text-only confirmation',
294
- message:hostileMessage,onConfirm:()=>{syntheticConfirmed++;}});
294
+ message:hostileMessage,confirmText:hostileMessage,cancelText:hostileMessage,
295
+ onConfirm:()=>{syntheticConfirmed++;}});
296
await wait(25);
297
const safeConfirm=FINORA.Modal.stack[FINORA.Modal.stack.length-1]?.card;
298
if (!safeConfirm || safeConfirm.querySelector('[data-confirm-message]')?.textContent!==hostileMessage ||
299
+ safeConfirm.querySelector('[data-action="confirm"]')?.textContent!==hostileMessage ||
300
+ safeConfirm.querySelector('[data-action="cancel"]')?.textContent!==hostileMessage ||
301
safeConfirm.querySelector('img') || window.Q01_INJECTED) {
302
throw Error('Confirmation message was interpreted as executable HTML');
303
}