Pre formatting Bottle tests

This commit is contained in:
Kevin Stubbings
2024-09-23 14:37:22 -07:00
parent 6efb3c69ef
commit 5d12f7bd30
5 changed files with 148 additions and 52 deletions

View File

@@ -0,0 +1,4 @@
argumentToEnsureNotTaintedNotMarkedAsSpurious
untaintedArgumentToEnsureTaintedNotMarkedAsMissing
testFailures
failures

View File

@@ -0,0 +1,2 @@
import experimental.meta.InlineTaintTest
import MakeInlineTaintTest<TestTaintTrackingConfig>

View File

@@ -0,0 +1,10 @@
import bottle
from bottle import Bottle, response, request
app = Bottle()
@app.route('/test', method=['OPTIONS', 'GET']) # $ routeSetup="/test"
def test1(): # $ requestHandler
response.headers['Content-type'] = 'application/json' # $ headerWriteName='Content-type' headerWriteValue='application/json'
return '[1]' # $ HttpResponse responseBody='[1]' mimetype=text/html
app.run()

View File

@@ -0,0 +1,21 @@
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()