There was an error while loading. Please reload this page.
1 parent 5422699 commit f9cec07Copy full SHA for f9cec07
1 file changed
cypress/e2e/metadata-xss-sanitization.cy.ts
@@ -12,8 +12,8 @@
12
describe('Metadata XSS sanitization', () => {
13
// A classic XSS payload: an image with a broken `src` so that its `onerror` handler fires as soon as
14
// the browser tries (and fails) to load it. If the payload is not sanitized, `onerror` will run and set
15
- // `window.dsXssExecuted = true`.
16
- const XSS_PAYLOAD = 'XSS Test <img src="x" onerror="window.dsXssExecuted = true;"/>';
+ // `window.dsXssExecuted = true`. (NOTE: This uses "role=presentation" to avoid failing accessibility checks)
+ const XSS_PAYLOAD = 'XSS Test <img src="x" onerror="window.dsXssExecuted = true;" role="presentation"/>';
17
const SAFE_TEXT = 'XSS Test';
18
const UNIQUE_TITLE = `XSS sanitization test item ${Date.now()}`;
19
0 commit comments