mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
Python: Properly model flask.send_from_directory
To not include `filename` as path-injection sink.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from flask import send_from_directory, send_file
|
||||
|
||||
send_from_directory("filepath", "file") # $ getAPathArgument="filepath" getAPathArgument="file"
|
||||
send_from_directory(directory="filepath", filename="file") # $ getAPathArgument="filepath" getAPathArgument="file"
|
||||
send_from_directory("dir", "file") # $ getAPathArgument="dir" getAPathArgument="file"
|
||||
send_from_directory(directory="dir", filename="file") # $ getAPathArgument="dir" getAPathArgument="file"
|
||||
|
||||
send_file("file") # $ getAPathArgument="file"
|
||||
send_file(filename_or_fp="file") # $ getAPathArgument="file"
|
||||
|
||||
Reference in New Issue
Block a user