File tree Expand file tree Collapse file tree
python/ql/src/semmle/python Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -473,5 +473,40 @@ module HTTP {
473473 }
474474 }
475475 }
476+
477+ /**
478+ * A data-flow node that creates a HTTP redirect response on a server.
479+ *
480+ * Note: we don't require that this redirect must be sent to a client (a kind of
481+ * "if a tree falls in a forest and nobody hears it" situation).
482+ *
483+ * Extend this class to refine existing API models. If you want to model new APIs,
484+ * extend `HttpRedirectResponse::Range` instead.
485+ */
486+ class HttpRedirectResponse extends HttpResponse {
487+ override HttpRedirectResponse:: Range range ;
488+
489+ HttpRedirectResponse ( ) { this = range }
490+
491+ /** Gets the data-flow node that specifies the location of this HTTP redirect response. */
492+ DataFlow:: Node getRedirectLocation ( ) { result = range .getRedirectLocation ( ) }
493+ }
494+
495+ /** Provides a class for modeling new HTTP redirect response APIs. */
496+ module HttpRedirectResponse {
497+ /**
498+ * A data-flow node that creates a HTTP redirect response on a server.
499+ *
500+ * Note: we don't require that this redirect must be sent to a client (a kind of
501+ * "if a tree falls in a forest and nobody hears it" situation).
502+ *
503+ * Extend this class to model new APIs. If you want to refine existing API models,
504+ * extend `HttpResponse` instead.
505+ */
506+ abstract class Range extends HTTP:: Server:: HttpResponse:: Range {
507+ /** Gets the data-flow node that specifies the location of this HTTP redirect response. */
508+ abstract DataFlow:: Node getRedirectLocation ( ) ;
509+ }
510+ }
476511 }
477512}
You can’t perform that action at this time.
0 commit comments