mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
adjust comment about slash position
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
doSomeThingWithTrustedURL(x);
|
||||
}
|
||||
|
||||
x.startsWith("https://secure.com/foo/bar"); // OK - the trailing slash makes prefix checks safe.
|
||||
x.startsWith("https://secure.com/foo/bar"); // OK - a forward slash after the domain makes prefix checks safe.
|
||||
x.indexOf("https://secure.com/foo/bar") >= 0 // NOT OK - the url can be anywhere in the string.
|
||||
x.indexOf("https://secure.com") >= 0 // NOT OK
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user