Skip to content

Commit 017a778

Browse files
committed
Polish make_response and fix extend argument
1 parent eac5254 commit 017a778

File tree

1 file changed

+4
-5
lines changed
  • python/ql/src/experimental/semmle/python/frameworks

1 file changed

+4
-5
lines changed

python/ql/src/experimental/semmle/python/frameworks/Flask.qll

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ module ExperimentalFlask {
2121
* - https://flask.palletsprojects.com/en/1.1.x/api/#flask.make_response
2222
*/
2323
private API::Node flaskMakeResponse() {
24-
result in [
25-
API::moduleImport("flask").getMember("make_response"),
26-
Flask::FlaskApp::instance().getMember("make_response")
27-
]
24+
result =
25+
[API::moduleImport("flask"), Flask::FlaskApp::instance()]
26+
.getMember(["make_response", "jsonify", "make_default_options_response"])
2827
}
2928

3029
/** Gets a reference to a header instance. */
@@ -63,7 +62,7 @@ module ExperimentalFlask {
6362
private class FlaskMakeResponseExtend extends DataFlow::CallCfgNode, HeaderDeclaration::Range {
6463
FlaskMakeResponseExtend() { this.getFunction() = headerInstanceCall() }
6564

66-
override DataFlow::Node getHeaderInput() { result = this.getArg(0) }
65+
override DataFlow::Node getHeaderInput() { result = this.getArg(_) }
6766
}
6867

6968
private class FlaskResponse extends DataFlow::CallCfgNode, HeaderDeclaration::Range {

0 commit comments

Comments
 (0)