File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed
python/ql/src/semmle/python/web/django Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ class DjangoShortcutsRedirectSink extends HttpRedirectTaintSink {
2121 }
2222}
2323
24+ /** DEPRECATED: Use `DjangoShortcutsRedirectSink` instead. */
25+ deprecated class DjangoRedirect = DjangoShortcutsRedirectSink ;
26+
2427/**
2528 * The URL argument when instantiating a Django Redirect Response.
2629 */
Original file line number Diff line number Diff line change @@ -4,6 +4,16 @@ import semmle.python.security.strings.Basic
44private import semmle.python.web.django.Shared
55private import semmle.python.web.Http
66
7+ /**
8+ * DEPRECATED: This class is internal to the django library modeling, and should
9+ * never be used by anyone.
10+ *
11+ * A django.http.response.Response object
12+ * This isn't really a "taint", but we use the value tracking machinery to
13+ * track the flow of response objects.
14+ */
15+ deprecated class DjangoResponse = DjangoResponseKind ;
16+
717/** INTERNAL class used for tracking a django response object. */
818private class DjangoResponseKind extends TaintKind {
919 DjangoResponseKind ( ) { this = "django.response.HttpResponse" }
Original file line number Diff line number Diff line change 11import python
22
3+ /** DEPRECATED: Use `Value::named("django.shortcuts.redirect")` instead. */
4+ deprecated FunctionValue redirect ( ) { result = Value:: named ( "django.shortcuts.redirect" ) }
5+
6+ /** DEPRECATED: Use `DjangoRedirectResponseClass` instead. */
7+ deprecated ClassValue theDjangoHttpRedirectClass ( ) {
8+ // version 1.x
9+ result = Value:: named ( "django.http.response.HttpResponseRedirectBase" )
10+ or
11+ // version 2.x
12+ result = Value:: named ( "django.http.HttpResponseRedirectBase" )
13+ }
14+
315/** A class that is a Django Redirect Response (subclass of `django.http.HttpResponseRedirectBase`). */
416class DjangoRedirectResponseClass extends ClassValue {
517 DjangoRedirectResponseClass ( ) {
You can’t perform that action at this time.
0 commit comments