File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
javascript/ql/src/semmle/javascript Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -415,7 +415,7 @@ module AccessPath {
415
415
pragma [ inline]
416
416
DataFlow:: SourceNode getAnAliasedSourceNode ( DataFlow:: Node node ) {
417
417
exists ( DataFlow:: SourceNode root , string accessPath |
418
- node = AccessPath:: getAReferenceTo ( root , accessPath ) and
418
+ node = pragma [ only_bind_into ] ( AccessPath:: getAReferenceTo ( root , accessPath ) ) and
419
419
result = AccessPath:: getAReferenceTo ( root , accessPath )
420
420
)
421
421
or
Original file line number Diff line number Diff line change @@ -196,11 +196,14 @@ module Hapi {
196
196
197
197
private DataFlow:: SourceNode getARouteHandler ( DataFlow:: TypeBackTracker t ) {
198
198
t .start ( ) and
199
- result = handler . flow ( ) .getALocalSource ( )
199
+ result = getRouteHandler ( ) .getALocalSource ( )
200
200
or
201
201
exists ( DataFlow:: TypeBackTracker t2 | result = getARouteHandler ( t2 ) .backtrack ( t2 , t ) )
202
202
}
203
203
204
+ pragma [ noinline]
205
+ private DataFlow:: Node getRouteHandler ( ) { result = handler .flow ( ) }
206
+
204
207
Expr getRouteHandlerExpr ( ) { result = handler }
205
208
206
209
override Expr getServer ( ) { result = server }
Original file line number Diff line number Diff line change @@ -7,13 +7,16 @@ import semmle.javascript.frameworks.HTTP
7
7
import semmle.javascript.security.dataflow.DOM
8
8
9
9
/** A data flow source of remote user input. */
10
+ cached
10
11
abstract class RemoteFlowSource extends DataFlow:: Node {
11
12
/** Gets a string that describes the type of this remote flow source. */
13
+ cached
12
14
abstract string getSourceType ( ) ;
13
15
14
16
/**
15
17
* Holds if this can be a user-controlled object, such as a JSON object parsed from user-controlled data.
16
18
*/
19
+ cached
17
20
predicate isUserControlledObject ( ) { none ( ) }
18
21
}
19
22
You can’t perform that action at this time.
0 commit comments