Skip to content

Commit 2c74ddb

Browse files
Add django FileRsponse as a wrapper
1 parent b2acfbc commit 2c74ddb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

python/ql/src/Resources/FileNotAlwaysClosedQuery.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ class FileWrapperCall extends DataFlow::CallCfgNode {
3636
or
3737
wrapped = this.getArg(0) and
3838
this = API::moduleImport("os").getMember("fdopen").getACall()
39+
or
40+
wrapped = this.getArg(0) and
41+
this = API::moduleImport("django").getMember("http").getMember("FileResponse").getACall()
3942
}
4043

4144
/** Gets the file that this call wraps. */

0 commit comments

Comments
 (0)