File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
ruby/ql/lib/codeql/ruby/frameworks Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -237,11 +237,8 @@ module Grape {
237237 */
238238 private class GrapeHeadersBlockCall extends MethodCall {
239239 GrapeHeadersBlockCall ( ) {
240- exists ( GrapeApiClass api |
241- this .getParent + ( ) = api .getADeclaration ( ) and
242- this .getMethodName ( ) = "headers" and
243- exists ( this .getBlock ( ) )
244- )
240+ this = grapeApiInstance ( ) .getAMethodCall ( "headers" ) .asExpr ( ) .getExpr ( ) and
241+ exists ( this .getBlock ( ) )
245242 }
246243 }
247244
@@ -251,11 +248,8 @@ module Grape {
251248 */
252249 private class GrapeCookiesBlockCall extends MethodCall {
253250 GrapeCookiesBlockCall ( ) {
254- exists ( GrapeApiClass api |
255- this .getParent + ( ) = api .getADeclaration ( ) and
256- this .getMethodName ( ) = "cookies" and
257- exists ( this .getBlock ( ) )
258- )
251+ this = grapeApiInstance ( ) .getAMethodCall ( "cookies" ) .asExpr ( ) .getExpr ( ) and
252+ exists ( this .getBlock ( ) )
259253 }
260254 }
261255
You can’t perform that action at this time.
0 commit comments