Skip to content

Commit 9a397b6

Browse files
RasmusWLyoff
andauthored
Python: Apply code-review suggestion
Co-authored-by: yoff <lerchedahl@gmail.com>
1 parent 8e5557e commit 9a397b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

python/ql/src/semmle/python/frameworks/Django.qll

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1881,8 +1881,9 @@ private module Django {
18811881
// Since we're still installing dependencies and analyzing their source code,
18821882
// without explicitly filtering out this call, we would be double-counting such
18831883
// route-setups :( One practical negative side effect of double-counting it, is
1884-
// that since we can't figure out the URL, we mark ANY parameter as being a
1885-
// routed-parameter, which can lead to FPs.
1884+
// that since we can't figure out the URL in the library code calling `django.urls.re_path`
1885+
// (because we only consider local flow), we will for all those cases mark ANY parameter
1886+
// as being a routed-parameter, which can lead to FPs.
18861887
not exists(Module mod |
18871888
mod.getName() = "django.conf.urls.__init__" and
18881889
node.getEnclosingModule() = mod

0 commit comments

Comments
 (0)