mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-23 17:29:54 +02:00
Adding integration test
This commit is contained in:
@@ -105,4 +105,9 @@ describe('XSS', () => {
|
|||||||
cy.wait(1000);
|
cy.wait(1000);
|
||||||
cy.get('#the-malware').should('not.exist');
|
cy.get('#the-malware').should('not.exist');
|
||||||
});
|
});
|
||||||
|
it('should not allow maniplulating antiscript to run javascript iframes in class diagrams', () => {
|
||||||
|
cy.visit('http://localhost:9000/xss14.html');
|
||||||
|
cy.wait(1000);
|
||||||
|
cy.get('#the-malware').should('not.exist');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@@ -86,7 +86,7 @@
|
|||||||
var diagram = "classDiagram\n"
|
var diagram = "classDiagram\n"
|
||||||
diagram += "classA <-- classB : <ifr";
|
diagram += "classA <-- classB : <ifr";
|
||||||
diagram += "ame/srcdoc='<scr";
|
diagram += "ame/srcdoc='<scr";
|
||||||
diagram += "ipt>alert(`XSS`)</";
|
diagram += "ipt>parent.xssAttack(`XSS`)</";
|
||||||
diagram += "script>'>";
|
diagram += "script>'>";
|
||||||
|
|
||||||
// var diagram = "stateDiagram-v2\n";
|
// var diagram = "stateDiagram-v2\n";
|
||||||
|
Reference in New Issue
Block a user