Skip to content

Commit a9e8167

Browse files
author
Max Schaefer
committed
Make suggestion to replace example.com more explicit.
1 parent 7ddb7da commit a9e8167

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

javascript/ql/src/Security/CWE-601/ServerSideUrlRedirect.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ stays the same:
4747

4848
<p>
4949
Note that as written, the above code will allow redirects to URLs on <code>example.com</code>,
50-
which is harmless but perhaps not intended. Substitute your own domain name for
50+
which is harmless but perhaps not intended. You can substitute your own domain (if known) for
5151
<code>example.com</code> to prevent this.
5252
</p>
5353

javascript/ql/src/Security/CWE-601/examples/ServerSideUrlRedirectGood2.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const app = require("express")();
33
function isLocalUrl(path) {
44
try {
55
return (
6+
// TODO: consider substituting your own domain for example.com
67
new URL(path, "https://example.com").origin === "https://example.com"
78
);
89
} catch (e) {

javascript/ql/test/query-tests/Security/CWE-601/ServerSideUrlRedirect/ServerSideUrlRedirectGood2.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const app = require("express")();
33
function isLocalUrl(path) {
44
try {
55
return (
6+
// TODO: consider substituting your own domain for example.com
67
new URL(path, "https://example.com").origin === "https://example.com"
78
);
89
} catch (e) {

0 commit comments

Comments
 (0)