mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Python: Add missing type-tracking step for django.views
Easy to overlook, and will onyl be caught by tests if they use `import parent.thing` and not `from parent import thing`
This commit is contained in:
@@ -35,7 +35,7 @@ private module Django {
|
||||
* WARNING: Only holds for a few predefined attributes.
|
||||
*/
|
||||
private DataFlow::Node django_attr(DataFlow::TypeTracker t, string attr_name) {
|
||||
attr_name in ["db", "urls", "http", "conf"] and
|
||||
attr_name in ["db", "urls", "http", "conf", "views"] and
|
||||
(
|
||||
t.start() and
|
||||
result = DataFlow::importNode("django" + "." + attr_name)
|
||||
|
||||
@@ -39,7 +39,7 @@ class ClassView(View, Foo):
|
||||
|
||||
# direct import with full path to `View` class (previously not supported)
|
||||
class ClassView2(django.views.generic.base.View):
|
||||
def get(self, request): # $ MISSING: requestHandler
|
||||
def get(self, request): # $ requestHandler
|
||||
pass
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user