mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
Python: Fixup annotation for CWE-022-PathInjection/pathlib_use.py
This commit is contained in:
@@ -11,7 +11,7 @@ STATIC_DIR = pathlib.Path("/server/static/")
|
||||
def path_injection():
|
||||
filename = request.args.get('filename', '')
|
||||
p = STATIC_DIR / filename
|
||||
p.open() # NOT OK
|
||||
p.open() # $ result=BAD
|
||||
|
||||
p2 = pathlib.Path(STATIC_DIR, filename)
|
||||
p2.open() # NOT OK
|
||||
p2.open() # $ result=BAD
|
||||
|
||||
Reference in New Issue
Block a user