mirror of
https://github.com/github/codeql.git
synced 2026-04-25 16:55:19 +02:00
Make suggestion to replace example.com more explicit.
This commit is contained in:
@@ -47,7 +47,7 @@ stays the same:
|
||||
|
||||
<p>
|
||||
Note that as written, the above code will allow redirects to URLs on <code>example.com</code>,
|
||||
which is harmless but perhaps not intended. Substitute your own domain name for
|
||||
which is harmless but perhaps not intended. You can substitute your own domain (if known) for
|
||||
<code>example.com</code> to prevent this.
|
||||
</p>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ const app = require("express")();
|
||||
function isLocalUrl(path) {
|
||||
try {
|
||||
return (
|
||||
// TODO: consider substituting your own domain for example.com
|
||||
new URL(path, "https://example.com").origin === "https://example.com"
|
||||
);
|
||||
} catch (e) {
|
||||
|
||||
@@ -3,6 +3,7 @@ const app = require("express")();
|
||||
function isLocalUrl(path) {
|
||||
try {
|
||||
return (
|
||||
// TODO: consider substituting your own domain for example.com
|
||||
new URL(path, "https://example.com").origin === "https://example.com"
|
||||
);
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user