@@ -207,9 +207,7 @@ module Spife {
207
207
rh .getARequestSource ( ) .ref ( ) .getAPropertyRead ( [ "headers" , "rawHeaders" ] ) .getAPropertyRead ( )
208
208
}
209
209
210
- override string getAHeaderName ( ) {
211
- result = super .getPropertyName ( ) .toLowerCase ( )
212
- }
210
+ override string getAHeaderName ( ) { result = super .getPropertyName ( ) .toLowerCase ( ) }
213
211
214
212
override RouteHandler getRouteHandler ( ) { result = rh }
215
213
@@ -233,9 +231,7 @@ module Spife {
233
231
result = this and
234
232
t .start ( )
235
233
or
236
- exists ( DataFlow:: TypeTracker t2 |
237
- result = this .reachesHandlerReturn ( t2 ) .track ( t2 , t )
238
- )
234
+ exists ( DataFlow:: TypeTracker t2 | result = this .reachesHandlerReturn ( t2 ) .track ( t2 , t ) )
239
235
}
240
236
241
237
/**
@@ -254,7 +250,6 @@ module Spife {
254
250
* An HTTP header defined in a Spife response.
255
251
*/
256
252
private class HeaderDefinition extends Http:: ExplicitHeaderDefinition , DataFlow:: MethodCallNode instanceof ReplySource {
257
-
258
253
HeaderDefinition ( ) {
259
254
// reply.header(RESPONSE, 'Cache-Control', 'no-cache')
260
255
exists ( DataFlow:: MethodCallNode call |
@@ -316,7 +311,6 @@ module Spife {
316
311
*/
317
312
private class ContentTypeRouteHandlerHeader extends Http:: ImplicitHeaderDefinition ,
318
313
DataFlow:: FunctionNode instanceof RouteHandler {
319
-
320
314
override predicate defines ( string headerName , string headerValue ) {
321
315
headerName = "content-type" and headerValue = "application/json"
322
316
}
@@ -328,7 +322,6 @@ module Spife {
328
322
* An HTTP cookie defined in a Spife HTTP response.
329
323
*/
330
324
private class CookieDefinition extends Http:: CookieDefinition , DataFlow:: MethodCallNode instanceof ReplySource {
331
-
332
325
CookieDefinition ( ) {
333
326
// reply.cookie(RESPONSE, 'TEST', 'FOO', {"maxAge": 1000, "httpOnly": true, "secure": true})
334
327
this .ref ( ) .( DataFlow:: MethodCallNode ) .getMethodName ( ) = "cookie"
@@ -400,10 +393,7 @@ module Spife {
400
393
* An invocation of the `redirect` method of an HTTP response object.
401
394
*/
402
395
private class RedirectInvocation extends Http:: RedirectInvocation , DataFlow:: MethodCallNode instanceof ReplySource {
403
-
404
- RedirectInvocation ( ) {
405
- this .ref ( ) .( DataFlow:: MethodCallNode ) .getMethodName ( ) = "redirect"
406
- }
396
+ RedirectInvocation ( ) { this .ref ( ) .( DataFlow:: MethodCallNode ) .getMethodName ( ) = "redirect" }
407
397
408
398
override DataFlow:: Node getUrlArgument ( ) { result = this .getAnArgument ( ) }
409
399
@@ -413,10 +403,9 @@ module Spife {
413
403
/**
414
404
* A call to `reply.template('template', { ... })`, seen as a template instantiation.
415
405
*/
416
- private class TemplateCall extends Templating:: TemplateInstantiation:: Range , DataFlow:: MethodCallNode instanceof ReplySource {
417
- TemplateCall ( ) {
418
- this .getMethodName ( ) = "template"
419
- }
406
+ private class TemplateCall extends Templating:: TemplateInstantiation:: Range ,
407
+ DataFlow:: MethodCallNode instanceof ReplySource {
408
+ TemplateCall ( ) { this .getMethodName ( ) = "template" }
420
409
421
410
override DataFlow:: SourceNode getOutput ( ) { result = this }
422
411
0 commit comments