Files
codeql/python/ql/test/library-tests/frameworks/bottle/taint_test.py
2024-09-23 14:37:22 -07:00

21 lines
580 B
Python

import bottle
from bottle import response, request
app = bottle.app()
@app.route('/test', method=['OPTIONS', 'GET']) # $ routeSetup="/test"
def test1(): # $ requestHandler
ensure_tainted(
request.headers, # $ tainted
request.headers, # $ tainted
request.forms, # $ tainted
request.params, # $ tainted
request.url, # $ tainted
request.body, # $ tainted
request.fullpath, # $ tainted
request.query_string # $ tainted
)
return '[1]' # $ HttpResponse mimetype=text/html responseBody='[1]'
app.run()