File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed
go/ql/lib/semmle/go/frameworks Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -160,21 +160,17 @@ module Twirp {
160
160
}
161
161
}
162
162
163
+
163
164
/**
164
- * A request coming to the service handler
165
+ * A request coming to the service handler.
165
166
*/
166
- class Request extends UntrustedFlowSource:: Range , DataFlow:: ParameterNode {
167
- ServiceHandler handler ;
168
-
167
+ class Request extends UntrustedFlowSource:: Range instanceof DataFlow:: ParameterNode {
169
168
Request ( ) {
170
- handler .getParameter ( 0 ) .getType ( ) .hasQualifiedName ( "context" , "Context" ) and
171
- handler .getParameter ( _) = this .asParameter ( ) and
172
- this .getType ( ) .( PointerType ) .getBaseType ( ) instanceof ProtobufMessageType
173
- }
174
-
175
- override predicate isParameterOf ( Callable c , int i ) {
176
- c .asFunction ( ) = handler and
177
- i = 1
169
+ exists ( Callable c , ServiceHandler handler | c .asFunction ( ) = handler |
170
+ this .isParameterOf ( c , 1 ) and
171
+ handler .getParameterType ( 0 ) .hasQualifiedName ( "context" , "Context" ) and
172
+ this .getType ( ) .( PointerType ) .getBaseType ( ) instanceof ProtobufMessageType
173
+ )
178
174
}
179
175
}
180
176
}
You can’t perform that action at this time.
0 commit comments