fix: typo in cypress

This commit is contained in:
yutotnh
2022-06-27 12:29:50 +09:00
parent ca909edbed
commit 5619b54cdb
28 changed files with 55 additions and 72 deletions

View File

@@ -41,7 +41,7 @@ describe('Configuration', () => {
.should('exist') .should('exist')
.and('include', 'url(#'); .and('include', 'url(#');
}); });
it('should handle arrowMarkerAbsolute excplicitly set to false', () => { it('should handle arrowMarkerAbsolute explicitly set to false', () => {
renderGraph( renderGraph(
`graph TD `graph TD
A[Christmas] -->|Get money| B(Go shopping) A[Christmas] -->|Get money| B(Go shopping)
@@ -63,7 +63,7 @@ describe('Configuration', () => {
.should('exist') .should('exist')
.and('include', 'url(#'); .and('include', 'url(#');
}); });
it('should handle arrowMarkerAbsolute excplicitly set to "false" as false', () => { it('should handle arrowMarkerAbsolute explicitly set to "false" as false', () => {
renderGraph( renderGraph(
`graph TD `graph TD
A[Christmas] -->|Get money| B(Go shopping) A[Christmas] -->|Get money| B(Go shopping)

View File

@@ -1,5 +1,5 @@
describe('Rerendering', () => { describe('Rerendering', () => {
it('should be able to render after an error has occured', () => { it('should be able to render after an error has occurred', () => {
const url = 'http://localhost:9000/render-after-error.html'; const url = 'http://localhost:9000/render-after-error.html';
cy.viewport(1440, 1024); cy.viewport(1440, 1024);
cy.visit(url); cy.visit(url);

View File

@@ -60,52 +60,52 @@ 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 htmlLabels into a false positive', () => { it('should not allow manipulating htmlLabels into a false positive', () => {
cy.visit('http://localhost:9000/xss4.html'); cy.visit('http://localhost:9000/xss4.html');
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', () => { it('should not allow manipulating antiscript to run javascript', () => {
cy.visit('http://localhost:9000/xss5.html'); cy.visit('http://localhost:9000/xss5.html');
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 using onerror', () => { it('should not allow manipulating antiscript to run javascript using onerror', () => {
cy.visit('http://localhost:9000/xss6.html'); cy.visit('http://localhost:9000/xss6.html');
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 using onerror in state diagrams with dagre wrapper', () => { it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre wrapper', () => {
cy.visit('http://localhost:9000/xss8.html'); cy.visit('http://localhost:9000/xss8.html');
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 using onerror in state diagrams with dagre d3', () => { it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => {
cy.visit('http://localhost:9000/xss9.html'); cy.visit('http://localhost:9000/xss9.html');
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 using onerror in state diagrams with dagre d3', () => { it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => {
cy.visit('http://localhost:9000/xss10.html'); cy.visit('http://localhost:9000/xss10.html');
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 using onerror in state diagrams with dagre d3', () => { it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => {
cy.visit('http://localhost:9000/xss11.html'); cy.visit('http://localhost:9000/xss11.html');
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 using onerror in state diagrams with dagre d3', () => { it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => {
cy.visit('http://localhost:9000/xss12.html'); cy.visit('http://localhost:9000/xss12.html');
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 using onerror in state diagrams with dagre d3', () => { it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => {
cy.visit('http://localhost:9000/xss13.html'); cy.visit('http://localhost:9000/xss13.html');
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', () => { it('should not allow manipulating antiscript to run javascript iframes in class diagrams', () => {
cy.visit('http://localhost:9000/xss14.html'); cy.visit('http://localhost:9000/xss14.html');
cy.wait(1000); cy.wait(1000);
cy.get('#the-malware').should('not.exist'); cy.get('#the-malware').should('not.exist');

View File

@@ -381,7 +381,7 @@ describe('Class diagram V2', () => {
cy.get('svg'); cy.get('svg');
}); });
it('16b: should handle the direction statemnent with TB', () => { it('16b: should handle the direction statement with TB', () => {
imgSnapshotTest( imgSnapshotTest(
` `
classDiagram classDiagram
@@ -406,7 +406,7 @@ describe('Class diagram V2', () => {
cy.get('svg'); cy.get('svg');
}); });
it('18: should handle the direction statemnent with LR', () => { it('18: should handle the direction statement with LR', () => {
imgSnapshotTest( imgSnapshotTest(
` `
classDiagram classDiagram
@@ -430,7 +430,7 @@ describe('Class diagram V2', () => {
); );
cy.get('svg'); cy.get('svg');
}); });
it('17a: should handle the direction statemnent with BT', () => { it('17a: should handle the direction statement with BT', () => {
imgSnapshotTest( imgSnapshotTest(
` `
classDiagram classDiagram
@@ -454,7 +454,7 @@ describe('Class diagram V2', () => {
); );
cy.get('svg'); cy.get('svg');
}); });
it('17b: should handle the direction statemment with RL', () => { it('17b: should handle the direction statement with RL', () => {
imgSnapshotTest( imgSnapshotTest(
` `
classDiagram classDiagram

View File

@@ -16,7 +16,7 @@ describe('Configuration and directives - nodes should be light blue', () => {
); );
cy.get('svg'); cy.get('svg');
}); });
it('Settigns from intitialize - nodes should be green', () => { it('Settings from initialize - nodes should be green', () => {
imgSnapshotTest( imgSnapshotTest(
` `
graph TD graph TD
@@ -30,7 +30,7 @@ graph TD
); );
cy.get('svg'); cy.get('svg');
}); });
it('Settings from initialize overriding themeVariable - nodes shold be red', () => { it('Settings from initialize overriding themeVariable - nodes should be red', () => {
imgSnapshotTest( imgSnapshotTest(
` `

View File

@@ -76,7 +76,7 @@ context('Sequence diagram', () => {
imgSnapshotTest( imgSnapshotTest(
` `
sequenceDiagram sequenceDiagram
Alice->>Bob: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be Alice->>Bob: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
loop Loopy loop Loopy
Bob->>Alice: Pasten Bob->>Alice: Pasten
end `, end `,
@@ -143,7 +143,7 @@ context('Sequence diagram', () => {
imgSnapshotTest( imgSnapshotTest(
` `
sequenceDiagram sequenceDiagram
participant A as Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be participant A as Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
A->>Bob: Hola A->>Bob: Hola
Bob-->A: Pasten ! Bob-->A: Pasten !
`, `,
@@ -154,7 +154,7 @@ context('Sequence diagram', () => {
imgSnapshotTest( imgSnapshotTest(
` `
sequenceDiagram sequenceDiagram
participant A as wrap:Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be participant A as wrap:Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
A->>Bob: Hola A->>Bob: Hola
Bob-->A: Pasten ! Bob-->A: Pasten !
`, `,
@@ -166,7 +166,7 @@ context('Sequence diagram', () => {
` `
%%{init: {'config': {'wrap': true }}}%% %%{init: {'config': {'wrap': true }}}%%
sequenceDiagram sequenceDiagram
participant A as Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be participant A as Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
A->>Bob: Hola A->>Bob: Hola
Bob-->A: Pasten ! Bob-->A: Pasten !
`, `,
@@ -190,7 +190,7 @@ context('Sequence diagram', () => {
` `
sequenceDiagram sequenceDiagram
Alice->>Bob: Hola Alice->>Bob: Hola
Note left of Alice: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be Note left of Alice: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though Bob->>Alice: I'm short though
`, `,
{} {}
@@ -201,7 +201,7 @@ context('Sequence diagram', () => {
` `
sequenceDiagram sequenceDiagram
Alice->>Bob: Hola Alice->>Bob: Hola
Note left of Alice:wrap: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be Note left of Alice:wrap: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though Bob->>Alice: I'm short though
`, `,
{} {}
@@ -212,7 +212,7 @@ context('Sequence diagram', () => {
` `
sequenceDiagram sequenceDiagram
Alice->>Bob: Hola Alice->>Bob: Hola
Note right of Alice: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be Note right of Alice: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though Bob->>Alice: I'm short though
`, `,
{} {}
@@ -223,7 +223,7 @@ context('Sequence diagram', () => {
` `
sequenceDiagram sequenceDiagram
Alice->>Bob: Hola Alice->>Bob: Hola
Note right of Alice:wrap: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be Note right of Alice:wrap: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though Bob->>Alice: I'm short though
`, `,
{} {}
@@ -234,7 +234,7 @@ context('Sequence diagram', () => {
` `
sequenceDiagram sequenceDiagram
Alice->>Bob: Hola Alice->>Bob: Hola
Note over Alice: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be Note over Alice: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though Bob->>Alice: I'm short though
`, `,
{} {}
@@ -245,7 +245,7 @@ context('Sequence diagram', () => {
` `
sequenceDiagram sequenceDiagram
Alice->>Bob: Hola Alice->>Bob: Hola
Note over Alice:wrap: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be Note over Alice:wrap: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though Bob->>Alice: I'm short though
`, `,
{} {}
@@ -255,7 +255,7 @@ context('Sequence diagram', () => {
imgSnapshotTest( imgSnapshotTest(
` `
sequenceDiagram sequenceDiagram
Alice->>Bob: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be Alice->>Bob: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though Bob->>Alice: I'm short though
`, `,
{} {}
@@ -265,7 +265,7 @@ context('Sequence diagram', () => {
imgSnapshotTest( imgSnapshotTest(
` `
sequenceDiagram sequenceDiagram
Alice->>Bob:wrap:Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be Alice->>Bob:wrap:Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though Bob->>Alice: I'm short though
`, `,
{} {}
@@ -276,7 +276,7 @@ context('Sequence diagram', () => {
` `
sequenceDiagram sequenceDiagram
Alice->>Bob: I'm short Alice->>Bob: I'm short
Bob->>Alice: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be Bob->>Alice: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
`, `,
{} {}
); );
@@ -286,7 +286,7 @@ context('Sequence diagram', () => {
` `
sequenceDiagram sequenceDiagram
Alice->>Bob: I'm short Alice->>Bob: I'm short
Bob->>Alice:wrap: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be Bob->>Alice:wrap: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
`, `,
{} {}
); );

View File

@@ -35,7 +35,7 @@ flowchart BT
</div> </div>
<div class="mermaid2" style="width: 50%; height: 200px;"> <div class="mermaid2" style="width: 50%; height: 200px;">
sequenceDiagram sequenceDiagram
Alice->>Bob:Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be Alice->>Bob:Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though Bob->>Alice: I'm short though
</div> </div>
<div class="mermaid2" style="width: 50%; height: 200px;"> <div class="mermaid2" style="width: 50%; height: 200px;">

View File

@@ -3,4 +3,4 @@ div.id = 'the-malware';
div.className = 'malware'; div.className = 'malware';
div.innerHTML = 'XSS Succeeded'; div.innerHTML = 'XSS Succeeded';
parent.document.getElementsByTagName('body')[0].appendChild(div); parent.document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');

View File

@@ -31,7 +31,7 @@
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
// const el = document.querySelector('.mermaid'); // const el = document.querySelector('.mermaid');
// el.parentNode.removeChild(el); // el.parentNode.removeChild(el);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');
} }
</script> </script>
</head> </head>

View File

@@ -84,7 +84,7 @@
div.className = 'malware'; div.className = 'malware';
div.innerHTML = 'XSS Succeeded'; div.innerHTML = 'XSS Succeeded';
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');
} }
var diagram = 'classDiagram\n'; var diagram = 'classDiagram\n';
@@ -105,4 +105,3 @@ mermaid.render('diagram', diagram, (res) => {
</script> </script>
</body> </body>
</html> </html>

View File

@@ -84,7 +84,7 @@
div.className = 'malware'; div.className = 'malware';
div.innerHTML = 'XSS Succeeded'; div.innerHTML = 'XSS Succeeded';
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');
} }
var diagram = 'stateDiagram-v2\n'; var diagram = 'stateDiagram-v2\n';
@@ -103,4 +103,3 @@ mermaid.render('diagram', diagram, (res) => {
</script> </script>
</body> </body>
</html> </html>

View File

@@ -84,7 +84,7 @@
div.className = 'malware'; div.className = 'malware';
div.innerHTML = 'XSS Succeeded'; div.innerHTML = 'XSS Succeeded';
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');
} }
var diagram = 'stateDiagram-v2\n'; var diagram = 'stateDiagram-v2\n';
@@ -103,4 +103,3 @@ mermaid.render('diagram', diagram, (res) => {
</script> </script>
</body> </body>
</html> </html>

View File

@@ -84,7 +84,7 @@
div.className = 'malware'; div.className = 'malware';
div.innerHTML = 'XSS Succeeded'; div.innerHTML = 'XSS Succeeded';
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');
} }
var diagram = 'stateDiagram-v2\n'; var diagram = 'stateDiagram-v2\n';
@@ -103,4 +103,3 @@ mermaid.render('diagram', diagram, (res) => {
</script> </script>
</body> </body>
</html> </html>

View File

@@ -84,7 +84,7 @@
div.className = 'malware'; div.className = 'malware';
div.innerHTML = 'XSS Succeeded'; div.innerHTML = 'XSS Succeeded';
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');
} }
var diagram = 'classDiagram\n'; var diagram = 'classDiagram\n';
@@ -105,4 +105,3 @@ mermaid.render('diagram', diagram, (res) => {
</script> </script>
</body> </body>
</html> </html>

View File

@@ -84,7 +84,7 @@
div.className = 'malware'; div.className = 'malware';
div.innerHTML = 'XSS Succeeded'; div.innerHTML = 'XSS Succeeded';
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');
} }
var diagram = `sequenceDiagram var diagram = `sequenceDiagram
@@ -104,4 +104,3 @@ mermaid.render('diagram', diagram, (res) => {
</script> </script>
</body> </body>
</html> </html>

View File

@@ -84,7 +84,7 @@
div.className = 'malware'; div.className = 'malware';
div.innerHTML = 'XSS Succeeded'; div.innerHTML = 'XSS Succeeded';
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');
} }
var diagram = `sequenceDiagram var diagram = `sequenceDiagram
@@ -103,4 +103,3 @@ mermaid.render('diagram', diagram, (res) => {
</script> </script>
</body> </body>
</html> </html>

View File

@@ -84,7 +84,7 @@
div.className = 'malware'; div.className = 'malware';
div.innerHTML = 'XSS Succeeded'; div.innerHTML = 'XSS Succeeded';
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');
} }
var diagram = `sequenceDiagram var diagram = `sequenceDiagram
@@ -103,4 +103,3 @@ mermaid.render('diagram', diagram, (res) => {
</script> </script>
</body> </body>
</html> </html>

View File

@@ -84,7 +84,7 @@
div.className = 'malware'; div.className = 'malware';
div.innerHTML = 'XSS Succeeded'; div.innerHTML = 'XSS Succeeded';
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');
} }
var diagram = `classDiagram var diagram = `classDiagram
@@ -102,4 +102,3 @@ mermaid.render('diagram', diagram, (res) => {
</script> </script>
</body> </body>
</html> </html>

View File

@@ -84,7 +84,7 @@
div.className = 'malware'; div.className = 'malware';
div.innerHTML = 'XSS Succeeded'; div.innerHTML = 'XSS Succeeded';
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');
} }
var diagram = `classDiagram var diagram = `classDiagram
@@ -104,4 +104,3 @@ mermaid.render('diagram', diagram, (res) => {
</script> </script>
</body> </body>
</html> </html>

View File

@@ -28,7 +28,7 @@
div.className = 'malware'; div.className = 'malware';
div.innerHTML = 'XSS Succeeded'; div.innerHTML = 'XSS Succeeded';
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');
} }
</script> </script>
</head> </head>

View File

@@ -84,7 +84,7 @@
div.className = 'malware'; div.className = 'malware';
div.innerHTML = 'XSS Succeeded'; div.innerHTML = 'XSS Succeeded';
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');
} }
// var diagram = ` graph TD // var diagram = ` graph TD
@@ -102,4 +102,3 @@ mermaid.render('diagram', diagram, (res) => {
</script> </script>
</body> </body>
</html> </html>

View File

@@ -84,7 +84,7 @@
div.className = 'malware'; div.className = 'malware';
div.innerHTML = 'XSS Succeeded'; div.innerHTML = 'XSS Succeeded';
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');
} }
// var diagram = ` graph TD // var diagram = ` graph TD
@@ -102,4 +102,3 @@ mermaid.render('diagram', diagram, (res) => {
</script> </script>
</body> </body>
</html> </html>

View File

@@ -28,7 +28,7 @@
div.className = 'malware'; div.className = 'malware';
div.innerHTML = 'XSS Succeeded'; div.innerHTML = 'XSS Succeeded';
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');
} }
</script> </script>
</head> </head>

View File

@@ -84,7 +84,7 @@
div.className = 'malware'; div.className = 'malware';
div.innerHTML = 'XSS Succeeded'; div.innerHTML = 'XSS Succeeded';
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');
} }
var diagram = 'graph LR\n'; var diagram = 'graph LR\n';
diagram += 'B-->D("<img onerror=location=`java'; diagram += 'B-->D("<img onerror=location=`java';
@@ -100,4 +100,3 @@ mermaid.render('diagram', diagram, (res) => {
</script> </script>
</body> </body>
</html> </html>

View File

@@ -84,7 +84,7 @@
div.className = 'malware'; div.className = 'malware';
div.innerHTML = 'XSS Succeeded'; div.innerHTML = 'XSS Succeeded';
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');
} }
var diagram = 'graph LR\n'; var diagram = 'graph LR\n';
diagram += 'A(<img/src/onerror=xssAttack`1`>)'; diagram += 'A(<img/src/onerror=xssAttack`1`>)';
@@ -98,4 +98,3 @@ mermaid.render('diagram', diagram, (res) => {
</script> </script>
</body> </body>
</html> </html>

View File

@@ -84,7 +84,7 @@
div.className = 'malware'; div.className = 'malware';
div.innerHTML = 'XSS Succeeded'; div.innerHTML = 'XSS Succeeded';
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');
} }
var diagram = 'graph LR\n'; var diagram = 'graph LR\n';
diagram += " B(<a href='<"; diagram += " B(<a href='<";
@@ -100,4 +100,3 @@ mermaid.render('diagram', diagram, (res) => {
</script> </script>
</body> </body>
</html> </html>

View File

@@ -84,7 +84,7 @@
div.className = 'malware'; div.className = 'malware';
div.innerHTML = 'XSS Succeeded'; div.innerHTML = 'XSS Succeeded';
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');
} }
var diagram = 'stateDiagram-v2\n'; var diagram = 'stateDiagram-v2\n';
@@ -99,4 +99,3 @@ mermaid.render('diagram', diagram, (res) => {
</script> </script>
</body> </body>
</html> </html>

View File

@@ -84,7 +84,7 @@
div.className = 'malware'; div.className = 'malware';
div.innerHTML = 'XSS Succeeded'; div.innerHTML = 'XSS Succeeded';
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeeded');
} }
var diagram = 'stateDiagram-v2\n'; var diagram = 'stateDiagram-v2\n';
@@ -99,4 +99,3 @@ mermaid.render('diagram', diagram, (res) => {
</script> </script>
</body> </body>
</html> </html>