Unit tests move and temporary ql

This commit is contained in:
jorgectf
2021-06-23 00:40:05 +02:00
parent 4d890ddeae
commit 7956b97ac3
11 changed files with 5 additions and 44 deletions

View File

@@ -0,0 +1,3 @@
select "1"
// void query to run and generate unit_tests.testproj database to test
// until we decide the objective of the query

View File

@@ -0,0 +1 @@
| 1 |

View File

@@ -0,0 +1 @@
experimental/Security/CWE-079/test.ql

View File

@@ -1,14 +0,0 @@
# This tests that the user doesn't pass user-tainted data into the msg.html attribute.
# source: https://pythonhosted.org/Flask-Mail/
from flask_mail import Message
@app.route("/")
def index():
msg = Message("Hello",
sender="from@example.com",
recipients=["to@example.com"])
msg.html = "<b>testing</b>"
mail.send(msg)

View File

@@ -1,14 +0,0 @@
# This tests that the user doesn't pass user-tainted data into the msg html initialized argument.
# source: https://pythonhosted.org/Flask-Mail/
from flask_mail import Message
@app.route("/")
def index():
msg = Message("Hello",
sender="from@example.com",
recipients=["to@example.com"],
html="<b>testing</b>")
mail.send(msg)

View File

@@ -1,16 +0,0 @@
# This tests that the user can't send multiple vulnerable emails.
# source: https://pythonhosted.org/Flask-Mail/
from flask_mail import Message
@app.route("/")
def index():
with mail.connect() as conn:
for user in users:
message = '...'
subject = "hello, %s" % user.name
msg = Message(recipients=[user.email],
html=message,
subject=subject)
conn.send(msg)