Skip to content

Commit ca68c8a

Browse files
committed
JS: Manually fix two comments in JSX
1 parent 5019074 commit ca68c8a

File tree

1 file changed

+2
-2
lines changed
  • javascript/ql/test/query-tests/Security/CWE-601/ClientSideUrlRedirect

1 file changed

+2
-2
lines changed

javascript/ql/test/query-tests/Security/CWE-601/ClientSideUrlRedirect/react.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Application extends React.Component {
77
<div className="application">
88
<Helmet>
99
<title>My unsafe app</title>
10-
<script type="application/javascript" src={document.location.hash.substr(1)}/> {/* NOT OK */}
10+
<script type="application/javascript" src={document.location.hash.substr(1)}/> {/* $ Alert */}
1111
</Helmet>
1212
</div>
1313
);
@@ -20,7 +20,7 @@ import Link from 'next/link'
2020
export function NextLink() {
2121
return <>
2222
<Link href={document.location.hash}><a>safe</a></Link> {/* OK */}
23-
<Link href={document.location.hash.substr(1)}><a>unsafe</a></Link> {/* NOT OK */}
23+
<Link href={document.location.hash.substr(1)}><a>unsafe</a></Link> {/* $ Alert */}
2424
</>;
2525
}
2626

0 commit comments

Comments
 (0)