@@ -290,6 +290,44 @@ module HTTP {
290290 }
291291 }
292292
293+ /**
294+ * An access to a user-controlled HTTP request input. For example, the URL or body of a request.
295+ * Instances of this class automatically become `RemoteFlowSource`s.
296+ *
297+ * Extend this class to refine existing API models. If you want to model new APIs,
298+ * extend `RequestInputAccess::Range` instead.
299+ */
300+ class RequestInputAccess extends DataFlow:: Node instanceof RequestInputAccess:: Range {
301+ /**
302+ * Gets a string that describes the type of this input.
303+ *
304+ * This is typically the name of the method that gives rise to this input.
305+ */
306+ string getSourceType ( ) { result = super .getSourceType ( ) }
307+ }
308+
309+ /** Provides a class for modeling new HTTP request inputs. */
310+ module RequestInputAccess {
311+ /**
312+ * An access to a user-controlled HTTP request input.
313+ *
314+ * Extend this class to model new APIs. If you want to refine existing API models,
315+ * extend `RequestInputAccess` instead.
316+ */
317+ abstract class Range extends DataFlow:: Node {
318+ /**
319+ * Gets a string that describes the type of this input.
320+ *
321+ * This is typically the name of the method that gives rise to this input.
322+ */
323+ abstract string getSourceType ( ) ;
324+ }
325+ }
326+
327+ private class RequestInputAccessAsRemoteFlowSource extends RemoteFlowSource:: Range instanceof RequestInputAccess {
328+ override string getSourceType ( ) { result = this .( RequestInputAccess ) .getSourceType ( ) }
329+ }
330+
293331 /**
294332 * A function that will handle incoming HTTP requests.
295333 *
@@ -343,7 +381,7 @@ module HTTP {
343381 }
344382
345383 /** A parameter that will receive parts of the url when handling an incoming request. */
346- private class RoutedParameter extends RemoteFlowSource :: Range , DataFlow:: ParameterNode {
384+ private class RoutedParameter extends RequestInputAccess :: Range , DataFlow:: ParameterNode {
347385 RequestHandler handler ;
348386
349387 RoutedParameter ( ) { this .getParameter ( ) = handler .getARoutedParameter ( ) }
0 commit comments