File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
javascript/ql/src/semmle/javascript/frameworks Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -238,7 +238,8 @@ module Firebase {
238238 }
239239
240240 /**
241- * Gets a node that refers to a `DataSnapshot` value or a promise thereof.
241+ * Gets a node that refers to a `DataSnapshot` value or a promise or `Change`
242+ * object containing `DataSnapshot`s.
242243 */
243244 DataFlow:: SourceNode snapshot ( DataFlow:: TypeTracker t ) {
244245 t .start ( ) and
@@ -250,6 +251,11 @@ module Firebase {
250251 result = snapshot ( _) .getAMethodCall ( "child" )
251252 or
252253 result = snapshot ( _) .getAMethodCall ( "forEach" ) .getCallback ( 0 ) .getParameter ( 0 )
254+ or
255+ exists ( string prop | result = snapshot ( _) .getAPropertyRead ( prop ) |
256+ prop = "before" or // only defined on Change objects
257+ prop = "after"
258+ )
253259 )
254260 or
255261 promiseTaintStep ( snapshot ( t ) , result )
You can’t perform that action at this time.
0 commit comments