Files
codeql/python/ql/test/library-tests/frameworks/cherrypy/FileSystemAccess.py
2023-11-06 19:13:57 +01:00

9 lines
337 B
Python

import cherrypy
from cherrypy.lib.static import serve_file, serve_download, staticfile
serve_file("file") # $ getAPathArgument="file"
serve_download("file") # $ getAPathArgument="file"
staticfile("file") # $ getAPathArgument="file"
# root won't make this safe
staticfile("file", root="/path/to/safe/dir") # $ getAPathArgument="file"