mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
support that two indexOf() calls use the same string-concatenation in getAnEquivalentIndexOfCall()
This commit is contained in:
@@ -9,4 +9,3 @@
|
||||
| tst.js:67:32:67:71 | x.index ... gth - 1 | This suffix check is missing a length comparison to correctly handle indexOf returning -1. |
|
||||
| tst.js:76:25:76:57 | index = ... gth - 1 | This suffix check is missing a length comparison to correctly handle indexOf returning -1. |
|
||||
| tst.js:80:10:80:57 | x.index ... th + 1) | This suffix check is missing a length comparison to correctly handle indexOf returning -1. |
|
||||
| tst.js:110:65:110:164 | trusted ... gth - 1 | This suffix check is missing a length comparison to correctly handle indexOf returning -1. |
|
||||
|
||||
@@ -107,5 +107,5 @@ function sameCheck(allowedOrigin) {
|
||||
|
||||
function sameConcatenation(allowedOrigin) {
|
||||
const trustedAuthority = "example.com";
|
||||
return trustedAuthority.indexOf("." + allowedOrigin) > 0 && trustedAuthority.indexOf("." + allowedOrigin) === trustedAuthority.length - allowedOrigin.length - 1; // OK - but currently failing
|
||||
return trustedAuthority.indexOf("." + allowedOrigin) > 0 && trustedAuthority.indexOf("." + allowedOrigin) === trustedAuthority.length - allowedOrigin.length - 1; // OK
|
||||
}
|
||||
Reference in New Issue
Block a user