Skip to content

Commit 99cc09d

Browse files
committed
JS: use TypeBackTracker where appropriate
1 parent 42c0efd commit 99cc09d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

javascript/ql/src/semmle/javascript/frameworks/Firebase.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ module Firebase {
131131
/**
132132
* Gets a node that is passed as the callback to a `Reference.transaction` call.
133133
*/
134-
DataFlow::SourceNode transactionCallback(DataFlow::TypeTracker t) {
134+
DataFlow::SourceNode transactionCallback(DataFlow::TypeBackTracker t) {
135135
t.start() and
136136
result = ref().getAMethodCall("transaction").getArgument(0).getALocalSource()
137137
or
138-
exists (DataFlow::TypeTracker t2 |
138+
exists (DataFlow::TypeBackTracker t2 |
139139
result = transactionCallback(t2).backtrack(t2, t)
140140
)
141141
}
@@ -217,15 +217,15 @@ module Firebase {
217217
/**
218218
* Gets a value that will be invoked with a `DataSnapshot` value as its first parameter.
219219
*/
220-
DataFlow::SourceNode snapshotCallback(DataFlow::TypeTracker t) {
220+
DataFlow::SourceNode snapshotCallback(DataFlow::TypeBackTracker t) {
221221
t.start() and
222222
(
223223
result = any(Database::QueryListenCall call).getCallbackNode().getALocalSource()
224224
or
225225
result = any(CloudFunctions::RefBuilderListenCall call).getCallbackNode().getALocalSource()
226226
)
227227
or
228-
exists (DataFlow::TypeTracker t2 |
228+
exists (DataFlow::TypeBackTracker t2 |
229229
result = snapshotCallback(t2).backtrack(t2, t)
230230
)
231231
}

0 commit comments

Comments
 (0)