Skip to content

Commit 3568439

Browse files
committed
change getAnElementRead to getASubstringRead
1 parent 8711a87 commit 3568439

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

javascript/ql/src/Security/CWE-020/IncompleteUrlSchemeCheck.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ DataFlow::SourceNode schemeOf(DataFlow::Node url) {
2929
// url.split(":")[0]
3030
exists(StringSplitCall split |
3131
split.getSeparator() = ":" and
32-
result = split.getAnElementRead(0) and
32+
result = split.getASubstringRead(0) and
3333
url = split.getBaseString()
3434
)
3535
or

javascript/ql/src/semmle/javascript/StandardLibrary.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,5 +178,5 @@ class StringSplitCall extends DataFlow::MethodCallNode {
178178
* Gets a read of the `i`th element from the split string.
179179
*/
180180
bindingset[i]
181-
DataFlow::Node getAnElementRead(int i) { result = getAPropertyRead(i.toString()) }
181+
DataFlow::Node getASubstringRead(int i) { result = getAPropertyRead(i.toString()) }
182182
}

javascript/ql/src/semmle/javascript/security/dataflow/Xss.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ module DomBasedXss {
285285
StringSplitCall splitCall;
286286

287287
QueryPrefixSanitizer() {
288-
this = splitCall.getAnElementRead(0) and
288+
this = splitCall.getASubstringRead(0) and
289289
splitCall.getSeparator() = "?" and
290290
splitCall.getBaseString().getALocalSource() = [DOM::locationRef(), DOM::locationRef().getAPropertyRead("href")]
291291
}

0 commit comments

Comments
 (0)