@@ -186,8 +186,7 @@ module Spife {
186
186
string kind ;
187
187
188
188
ContextInputAccess ( ) {
189
- request .ref ( ) .flowsTo ( super .getReceiver ( ) ) and
190
- super .getMethodName ( ) = "get" and
189
+ this = request .ref ( ) .getAMethodCall ( "get" )
191
190
kind = "path"
192
191
}
193
192
@@ -261,7 +260,7 @@ module Spife {
261
260
262
261
override predicate definesHeaderValue ( string headerName , DataFlow:: Node headerValue ) {
263
262
// reply.header(RESPONSE, 'Cache-Control', 'no-cache')
264
- headerName = this .getNameNode ( ) .getStringValue ( ) and
263
+ this .getNameNode ( ) .mayHaveStringValue ( headerName ) and
265
264
headerValue = this .getArgument ( 2 )
266
265
}
267
266
@@ -279,10 +278,10 @@ module Spife {
279
278
MultipleHeaderDefinitions ( ) {
280
279
// reply.header(RESPONSE, {'Cache-Control': 'no-cache'})
281
280
// reply(RESPONSE, {'Cache-Control': 'no-cache'})
282
- reply . ref ( ) . ( DataFlow:: CallNode ) . getCalleeName ( ) = [ "header" , " reply" ] and
283
- reply . ref ( ) . ( DataFlow :: CallNode ) . getAnArgument ( ) .getALocalSource ( ) instanceof
284
- DataFlow :: ObjectLiteralNode and
285
- this = reply
281
+ exists ( DataFlow:: CallNode call | call = [ reply . ref ( ) , reply . ref ( ) . getAMethodCall ( "header" ) ] |
282
+ call . getAnArgument ( ) .getALocalSource ( ) instanceof DataFlow :: ObjectLiteralNode and
283
+ this = call
284
+ )
286
285
}
287
286
288
287
/**
@@ -321,10 +320,10 @@ module Spife {
321
320
/**
322
321
* An HTTP cookie defined in a Spife HTTP response.
323
322
*/
324
- private class CookieDefinition extends Http:: CookieDefinition , DataFlow:: MethodCallNode instanceof ReplySource {
323
+ private class CookieDefinition extends Http:: CookieDefinition , DataFlow:: MethodCallNode {
325
324
CookieDefinition ( ) {
326
325
// reply.cookie(RESPONSE, 'TEST', 'FOO', {"maxAge": 1000, "httpOnly": true, "secure": true})
327
- this . ref ( ) . ( DataFlow :: MethodCallNode ) . getMethodName ( ) = "cookie"
326
+ this = any ( ReplySource r ) . ref ( ) . getAMethodCall ( "cookie" )
328
327
}
329
328
330
329
override DataFlow:: Node getNameArgument ( ) { result = this .getArgument ( 1 ) }
0 commit comments