@@ -526,8 +526,11 @@ module PrivateDjango {
526
526
/** Gets a reference to the `django` module. */
527
527
API:: Node django ( ) { result = API:: moduleImport ( "django" ) }
528
528
529
+ /** DEPRECATED: Alias for `DjangoImpl` */
530
+ deprecated module django = DjangoImpl;
531
+
529
532
/** Provides models for the `django` module. */
530
- module django {
533
+ module DjangoImpl {
531
534
// -------------------------------------------------------------------------
532
535
// django.db
533
536
// -------------------------------------------------------------------------
@@ -541,8 +544,11 @@ module PrivateDjango {
541
544
DjangoDb ( ) { this = API:: moduleImport ( "django" ) .getMember ( "db" ) }
542
545
}
543
546
547
+ /** DEPRECATED: Alias for `DB` */
548
+ deprecated module db = DB;
549
+
544
550
/** Provides models for the `django.db` module. */
545
- module db {
551
+ module DB {
546
552
/** Gets a reference to the `django.db.connection` object. */
547
553
API:: Node connection ( ) { result = db ( ) .getMember ( "connection" ) }
548
554
@@ -557,8 +563,11 @@ module PrivateDjango {
557
563
/** Gets a reference to the `django.db.models` module. */
558
564
API:: Node models ( ) { result = db ( ) .getMember ( "models" ) }
559
565
566
+ /** DEPRECATED: Alias for `Models` */
567
+ deprecated module models = Models;
568
+
560
569
/** Provides models for the `django.db.models` module. */
561
- module models {
570
+ module Models {
562
571
/**
563
572
* Provides models for the `django.db.models.Model` class and subclasses.
564
573
*
@@ -608,8 +617,11 @@ module PrivateDjango {
608
617
/** Gets a reference to the `django.db.models.expressions` module. */
609
618
API:: Node expressions ( ) { result = models ( ) .getMember ( "expressions" ) }
610
619
620
+ /** DEPRECATED: Alias for `Expressions` */
621
+ deprecated module expressions = Expressions;
622
+
611
623
/** Provides models for the `django.db.models.expressions` module. */
612
- module expressions {
624
+ module Expressions {
613
625
/** Provides models for the `django.db.models.expressions.RawSql` class. */
614
626
module RawSql {
615
627
/**
@@ -662,8 +674,8 @@ module PrivateDjango {
662
674
DataFlow:: Node sql ;
663
675
664
676
ObjectsAnnotate ( ) {
665
- this = django :: db :: models :: querySetReturningMethod ( "annotate" ) .getACall ( ) and
666
- django :: db :: models :: expressions :: RawSql:: instance ( sql ) in [
677
+ this = DjangoImpl :: DB :: Models :: querySetReturningMethod ( "annotate" ) .getACall ( ) and
678
+ DjangoImpl :: DB :: Models :: Expressions :: RawSql:: instance ( sql ) in [
667
679
this .getArg ( _) , this .getArgByName ( _)
668
680
]
669
681
}
@@ -680,8 +692,8 @@ module PrivateDjango {
680
692
DataFlow:: Node sql ;
681
693
682
694
ObjectsAlias ( ) {
683
- this = django :: db :: models :: querySetReturningMethod ( "alias" ) .getACall ( ) and
684
- django :: db :: models :: expressions :: RawSql:: instance ( sql ) in [
695
+ this = DjangoImpl :: DB :: Models :: querySetReturningMethod ( "alias" ) .getACall ( ) and
696
+ DjangoImpl :: DB :: Models :: Expressions :: RawSql:: instance ( sql ) in [
685
697
this .getArg ( _) , this .getArgByName ( _)
686
698
]
687
699
}
@@ -697,7 +709,7 @@ module PrivateDjango {
697
709
* - https://docs.djangoproject.com/en/3.1/ref/models/querysets/#raw
698
710
*/
699
711
private class ObjectsRaw extends SqlExecution:: Range , DataFlow:: CallCfgNode {
700
- ObjectsRaw ( ) { this = django :: db :: models :: querySetReturningMethod ( "raw" ) .getACall ( ) }
712
+ ObjectsRaw ( ) { this = DjangoImpl :: DB :: Models :: querySetReturningMethod ( "raw" ) .getACall ( ) }
701
713
702
714
override DataFlow:: Node getSql ( ) { result = this .getArg ( 0 ) }
703
715
}
@@ -708,7 +720,7 @@ module PrivateDjango {
708
720
* See https://docs.djangoproject.com/en/3.1/ref/models/querysets/#extra
709
721
*/
710
722
private class ObjectsExtra extends SqlExecution:: Range , DataFlow:: CallCfgNode {
711
- ObjectsExtra ( ) { this = django :: db :: models :: querySetReturningMethod ( "extra" ) .getACall ( ) }
723
+ ObjectsExtra ( ) { this = DjangoImpl :: DB :: Models :: querySetReturningMethod ( "extra" ) .getACall ( ) }
712
724
713
725
override DataFlow:: Node getSql ( ) {
714
726
result in [
@@ -723,8 +735,11 @@ module PrivateDjango {
723
735
/** Gets a reference to the `django.urls` module. */
724
736
API:: Node urls ( ) { result = django ( ) .getMember ( "urls" ) }
725
737
738
+ /** DEPRECATED: Alias for `Urls` */
739
+ deprecated module urls = Urls;
740
+
726
741
/** Provides models for the `django.urls` module */
727
- module urls {
742
+ module Urls {
728
743
/**
729
744
* Gets a reference to the `django.urls.path` function.
730
745
* See https://docs.djangoproject.com/en/3.0/ref/urls/#path
@@ -744,10 +759,16 @@ module PrivateDjango {
744
759
/** Gets a reference to the `django.conf` module. */
745
760
API:: Node conf ( ) { result = django ( ) .getMember ( "conf" ) }
746
761
762
+ /** DEPRECATED: Alias for `Conf` */
763
+ deprecated module conf = Conf;
764
+
747
765
/** Provides models for the `django.conf` module */
748
- module conf {
766
+ module Conf {
767
+ /** DEPRECATED: Alias for `ConfUrls` */
768
+ deprecated module conf_urls = ConfUrls;
769
+
749
770
/** Provides models for the `django.conf.urls` module */
750
- module conf_urls {
771
+ module ConfUrls {
751
772
// -------------------------------------------------------------------------
752
773
// django.conf.urls
753
774
// -------------------------------------------------------------------------
@@ -770,16 +791,22 @@ module PrivateDjango {
770
791
/** Gets a reference to the `django.http` module. */
771
792
API:: Node http ( ) { result = django ( ) .getMember ( "http" ) }
772
793
794
+ /** DEPRECATED: Alias for `Http` */
795
+ deprecated module http = Http;
796
+
773
797
/** Provides models for the `django.http` module */
774
- module http {
798
+ module Http {
775
799
// ---------------------------------------------------------------------------
776
800
// django.http.request
777
801
// ---------------------------------------------------------------------------
778
802
/** Gets a reference to the `django.http.request` module. */
779
803
API:: Node request ( ) { result = http ( ) .getMember ( "request" ) }
780
804
805
+ /** DEPRECATED: Alias for `Request` */
806
+ deprecated module request = Request;
807
+
781
808
/** Provides models for the `django.http.request` module. */
782
- module request {
809
+ module Request {
783
810
/**
784
811
* Provides models for the `django.http.request.HttpRequest` class
785
812
*
@@ -860,7 +887,7 @@ module PrivateDjango {
860
887
// special handling of the `build_absolute_uri` method, see
861
888
// https://docs.djangoproject.com/en/3.0/ref/request-response/#django.http.HttpRequest.build_absolute_uri
862
889
exists ( DataFlow:: AttrRead attr , DataFlow:: CallCfgNode call , DataFlow:: Node instance |
863
- instance = django :: http :: request :: HttpRequest:: instance ( ) and
890
+ instance = DjangoImpl :: Http :: Request :: HttpRequest:: instance ( ) and
864
891
attr .getObject ( ) = instance
865
892
|
866
893
attr .getAttributeName ( ) = "build_absolute_uri" and
@@ -937,8 +964,11 @@ module PrivateDjango {
937
964
/** Gets a reference to the `django.http.response` module. */
938
965
API:: Node response ( ) { result = http ( ) .getMember ( "response" ) }
939
966
967
+ /** DEPRECATED: Alias for `Response` */
968
+ deprecated module response = Response;
969
+
940
970
/** Provides models for the `django.http.response` module */
941
- module response {
971
+ module Response {
942
972
/**
943
973
* Provides models for the `django.http.response.HttpResponse` class
944
974
*
@@ -1672,17 +1702,17 @@ module PrivateDjango {
1672
1702
1673
1703
/** Gets a reference to the `django.http.response.HttpResponse.write` function. */
1674
1704
private DataFlow:: TypeTrackingNode write (
1675
- django :: http :: response :: HttpResponse:: InstanceSource instance , DataFlow:: TypeTracker t
1705
+ DjangoImpl :: Http :: Response :: HttpResponse:: InstanceSource instance , DataFlow:: TypeTracker t
1676
1706
) {
1677
1707
t .startInAttr ( "write" ) and
1678
- instance = django :: http :: response :: HttpResponse:: instance ( ) and
1708
+ instance = DjangoImpl :: Http :: Response :: HttpResponse:: instance ( ) and
1679
1709
result = instance
1680
1710
or
1681
1711
exists ( DataFlow:: TypeTracker t2 | result = write ( instance , t2 ) .track ( t2 , t ) )
1682
1712
}
1683
1713
1684
1714
/** Gets a reference to the `django.http.response.HttpResponse.write` function. */
1685
- DataFlow:: Node write ( django :: http :: response :: HttpResponse:: InstanceSource instance ) {
1715
+ DataFlow:: Node write ( DjangoImpl :: Http :: Response :: HttpResponse:: InstanceSource instance ) {
1686
1716
write ( instance , DataFlow:: TypeTracker:: end ( ) ) .flowsTo ( result )
1687
1717
}
1688
1718
@@ -1692,7 +1722,7 @@ module PrivateDjango {
1692
1722
* See https://docs.djangoproject.com/en/3.1/ref/request-response/#django.http.HttpResponse.write
1693
1723
*/
1694
1724
class HttpResponseWriteCall extends HTTP:: Server:: HttpResponse:: Range , DataFlow:: CallCfgNode {
1695
- django :: http :: response :: HttpResponse:: InstanceSource instance ;
1725
+ DjangoImpl :: Http :: Response :: HttpResponse:: InstanceSource instance ;
1696
1726
1697
1727
HttpResponseWriteCall ( ) { this .getFunction ( ) = write ( instance ) }
1698
1728
@@ -1713,7 +1743,7 @@ module PrivateDjango {
1713
1743
class DjangoResponseSetCookieCall extends HTTP:: Server:: CookieWrite:: Range ,
1714
1744
DataFlow:: MethodCallNode {
1715
1745
DjangoResponseSetCookieCall ( ) {
1716
- this .calls ( django :: http :: response :: HttpResponse:: instance ( ) , "set_cookie" )
1746
+ this .calls ( DjangoImpl :: Http :: Response :: HttpResponse:: instance ( ) , "set_cookie" )
1717
1747
}
1718
1748
1719
1749
override DataFlow:: Node getHeaderArg ( ) { none ( ) }
@@ -1733,7 +1763,7 @@ module PrivateDjango {
1733
1763
class DjangoResponseDeleteCookieCall extends HTTP:: Server:: CookieWrite:: Range ,
1734
1764
DataFlow:: MethodCallNode {
1735
1765
DjangoResponseDeleteCookieCall ( ) {
1736
- this .calls ( django :: http :: response :: HttpResponse:: instance ( ) , "delete_cookie" )
1766
+ this .calls ( DjangoImpl :: Http :: Response :: HttpResponse:: instance ( ) , "delete_cookie" )
1737
1767
}
1738
1768
1739
1769
override DataFlow:: Node getHeaderArg ( ) { none ( ) }
@@ -1760,7 +1790,7 @@ module PrivateDjango {
1760
1790
this .asCfgNode ( ) = subscript
1761
1791
|
1762
1792
cookieLookup .getAttributeName ( ) = "cookies" and
1763
- cookieLookup .getObject ( ) = django :: http :: response :: HttpResponse:: instance ( ) and
1793
+ cookieLookup .getObject ( ) = DjangoImpl :: Http :: Response :: HttpResponse:: instance ( ) and
1764
1794
exists ( DataFlow:: Node subscriptObj |
1765
1795
subscriptObj .asCfgNode ( ) = subscript .getObject ( )
1766
1796
|
@@ -1786,8 +1816,11 @@ module PrivateDjango {
1786
1816
/** Gets a reference to the `django.shortcuts` module. */
1787
1817
API:: Node shortcuts ( ) { result = django ( ) .getMember ( "shortcuts" ) }
1788
1818
1819
+ /** DEPRECATED: Alias for `Shortcuts` */
1820
+ deprecated module shortcuts = Shortcuts;
1821
+
1789
1822
/** Provides models for the `django.shortcuts` module */
1790
- module shortcuts {
1823
+ module Shortcuts {
1791
1824
/**
1792
1825
* Gets a reference to the `django.shortcuts.redirect` function
1793
1826
*
@@ -2063,7 +2096,7 @@ module PrivateDjango {
2063
2096
* See https://docs.djangoproject.com/en/3.0/ref/urls/#path
2064
2097
*/
2065
2098
private class DjangoUrlsPathCall extends DjangoRouteSetup , DataFlow:: CallCfgNode {
2066
- DjangoUrlsPathCall ( ) { this = django :: urls :: path ( ) .getACall ( ) }
2099
+ DjangoUrlsPathCall ( ) { this = DjangoImpl :: Urls :: path ( ) .getACall ( ) }
2067
2100
2068
2101
override DataFlow:: Node getUrlPatternArg ( ) {
2069
2102
result in [ this .getArg ( 0 ) , this .getArgByName ( "route" ) ]
@@ -2146,7 +2179,7 @@ module PrivateDjango {
2146
2179
*/
2147
2180
private class DjangoUrlsRePathCall extends DjangoRegexRouteSetup , DataFlow:: CallCfgNode {
2148
2181
DjangoUrlsRePathCall ( ) {
2149
- this = django :: urls :: re_path ( ) .getACall ( ) and
2182
+ this = DjangoImpl :: Urls :: re_path ( ) .getACall ( ) and
2150
2183
// `django.conf.urls.url` (which we support directly with
2151
2184
// `DjangoConfUrlsUrlCall`), is implemented in Django 2+ as backward compatibility
2152
2185
// using `django.urls.re_path`. See
@@ -2176,7 +2209,7 @@ module PrivateDjango {
2176
2209
* See https://docs.djangoproject.com/en/1.11/ref/urls/#django.conf.urls.url
2177
2210
*/
2178
2211
private class DjangoConfUrlsUrlCall extends DjangoRegexRouteSetup , DataFlow:: CallCfgNode {
2179
- DjangoConfUrlsUrlCall ( ) { this = django :: conf :: conf_urls :: url ( ) .getACall ( ) }
2212
+ DjangoConfUrlsUrlCall ( ) { this = DjangoImpl :: Conf :: ConfUrls :: url ( ) .getACall ( ) }
2180
2213
2181
2214
override DataFlow:: Node getUrlPatternArg ( ) {
2182
2215
result in [ this .getArg ( 0 ) , this .getArgByName ( "regex" ) ]
@@ -2189,7 +2222,7 @@ module PrivateDjango {
2189
2222
// HttpRequest taint modeling
2190
2223
// ---------------------------------------------------------------------------
2191
2224
/** A parameter that will receive the django `HttpRequest` instance when a request handler is invoked. */
2192
- private class DjangoRequestHandlerRequestParam extends django :: http :: request :: HttpRequest:: InstanceSource ,
2225
+ private class DjangoRequestHandlerRequestParam extends DjangoImpl :: Http :: Request :: HttpRequest:: InstanceSource ,
2193
2226
RemoteFlowSource:: Range , DataFlow:: ParameterNode {
2194
2227
DjangoRequestHandlerRequestParam ( ) {
2195
2228
this .getParameter ( ) = any ( DjangoRouteSetup setup ) .getARequestHandler ( ) .getRequestParam ( )
@@ -2206,7 +2239,7 @@ module PrivateDjango {
2206
2239
*
2207
2240
* See https://docs.djangoproject.com/en/3.1/topics/class-based-views/generic-display/#dynamic-filtering
2208
2241
*/
2209
- private class DjangoViewClassRequestAttributeRead extends django :: http :: request :: HttpRequest:: InstanceSource ,
2242
+ private class DjangoViewClassRequestAttributeRead extends DjangoImpl :: Http :: Request :: HttpRequest:: InstanceSource ,
2210
2243
RemoteFlowSource:: Range , DataFlow:: Node {
2211
2244
DjangoViewClassRequestAttributeRead ( ) {
2212
2245
exists ( DataFlow:: AttrRead read | this = read |
@@ -2253,7 +2286,7 @@ module PrivateDjango {
2253
2286
*/
2254
2287
private class DjangoShortcutsRedirectCall extends HTTP:: Server:: HttpRedirectResponse:: Range ,
2255
2288
DataFlow:: CallCfgNode {
2256
- DjangoShortcutsRedirectCall ( ) { this = django :: shortcuts :: redirect ( ) .getACall ( ) }
2289
+ DjangoShortcutsRedirectCall ( ) { this = DjangoImpl :: Shortcuts :: redirect ( ) .getACall ( ) }
2257
2290
2258
2291
/**
2259
2292
* Gets the data-flow node that specifies the location of this HTTP redirect response.
0 commit comments