Skip to content

Commit 1f4fc7f

Browse files
committed
add params, query to test
1 parent 0692568 commit 1f4fc7f

File tree

2 files changed

+17
-25
lines changed
  • javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/pages

2 files changed

+17
-25
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
export default function Post({ id, q }) {
2+
return (
3+
<>
4+
<div dangerouslySetInnerHTML={{__html: id }} />
5+
<div dangerouslySetInnerHTML={{__html: q }} />
6+
</>
7+
)
8+
}
9+
10+
export async function getServerSideProps(context) {
11+
return {
12+
props: {
13+
id: context.params?.id || "",
14+
q: context.query?.foobar || "",
15+
}
16+
}
17+
}

javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/pages/[id].tsx

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)