mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
Python: Port xmltodict tests
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
import xmltodict
|
||||
|
||||
x = "some xml"
|
||||
|
||||
xmltodict.parse(x) # $ input=x
|
||||
xmltodict.parse(x, disable_entities=False) # $ input=x vuln='Billion Laughs' vuln='Quadratic Blowup'
|
||||
@@ -1,17 +0,0 @@
|
||||
from flask import request, Flask
|
||||
from io import StringIO, BytesIO
|
||||
import xmltodict
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route("/xmltodict.parse")
|
||||
def xmltodict_parse():
|
||||
xml_content = request.args['xml_content']
|
||||
|
||||
return xmltodict.parse(xml_content) # OK
|
||||
|
||||
@app.route("/xmltodict.parse2")
|
||||
def xmltodict_parse2():
|
||||
xml_content = request.args['xml_content']
|
||||
|
||||
return xmltodict.parse(xml_content, disable_entities=False) # NOT OK for billion laughs/quadratic
|
||||
Reference in New Issue
Block a user