Skip to content

Commit c9d4521

Browse files
committed
Fix order of comments in test
1 parent 451fc2e commit c9d4521

3 files changed

Lines changed: 7 additions & 14 deletions

File tree

python/ql/test/experimental/query-tests/Security/CWE-091-XsltInjection/XsltInjection.expected

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,3 @@ nodes
129129
| xsltInjection.py:46:38:46:48 | ControlFlowNode for xsltStrings [List element] | semmle.label | ControlFlowNode for xsltStrings [List element] |
130130
| xsltInjection.py:50:24:50:32 | ControlFlowNode for xslt_root | semmle.label | ControlFlowNode for xslt_root |
131131
subpaths
132-
testFailures
133-
| xslt.py:14:29:14:37 | ControlFlowNode for xslt_root | Unexpected result: Alert |
134-
| xsltInjection.py:12:28:12:36 | ControlFlowNode for xslt_root | Unexpected result: Alert |
135-
| xsltInjection.py:21:29:21:37 | ControlFlowNode for xslt_root | Unexpected result: Alert |
136-
| xsltInjection.py:31:24:31:32 | ControlFlowNode for xslt_root | Unexpected result: Alert |
137-
| xsltInjection.py:40:24:40:32 | ControlFlowNode for xslt_root | Unexpected result: Alert |
138-
| xsltInjection.py:50:24:50:32 | ControlFlowNode for xslt_root | Unexpected result: Alert |

python/ql/test/experimental/query-tests/Security/CWE-091-XsltInjection/xslt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ def bad():
1111
xslt_root = etree.XML(xsltQuery)
1212
f = StringIO('<foo><bar></bar></foo>')
1313
tree = etree.parse(f)
14-
result_tree = tree.xslt(xslt_root) # Not OK # $ Alert
14+
result_tree = tree.xslt(xslt_root) # $ Alert # Not OK

python/ql/test/experimental/query-tests/Security/CWE-091-XsltInjection/xsltInjection.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
def a():
1010
xsltQuery = request.args.get('xml', '')
1111
xslt_root = etree.XML(xsltQuery)
12-
transform = etree.XSLT(xslt_root) # Not OK # $ Alert
12+
transform = etree.XSLT(xslt_root) # $ Alert # Not OK
1313

1414

1515
@app.route("/xslt2")
@@ -18,7 +18,7 @@ def b():
1818
xslt_root = etree.XML(xsltQuery)
1919
f = StringIO('<foo><bar></bar></foo>')
2020
tree = etree.parse(f)
21-
result_tree = tree.xslt(xslt_root) # Not OK # $ Alert
21+
result_tree = tree.xslt(xslt_root) # $ Alert # Not OK
2222

2323

2424
@app.route("/xslt3")
@@ -28,7 +28,7 @@ def c():
2828

2929
f = StringIO('<foo><bar></bar></foo>')
3030
tree = etree.parse(f)
31-
result = tree.xslt(xslt_root, a="'A'") # Not OK # $ Alert
31+
result = tree.xslt(xslt_root, a="'A'") # $ Alert # Not OK
3232

3333
@app.route("/xslt4")
3434
def d():
@@ -37,7 +37,7 @@ def d():
3737

3838
f = StringIO('<foo><bar></bar></foo>')
3939
tree = etree.parse(f)
40-
result = tree.xslt(xslt_root, a="'A'") # Not OK # $ Alert
40+
result = tree.xslt(xslt_root, a="'A'") # $ Alert # Not OK
4141

4242
@app.route("/xslt5")
4343
def e():
@@ -47,7 +47,7 @@ def e():
4747

4848
f = StringIO('<foo><bar></bar></foo>')
4949
tree = etree.parse(f)
50-
result = tree.xslt(xslt_root, a="'A'") # Not OK # $ Alert
50+
result = tree.xslt(xslt_root, a="'A'") # $ Alert # Not OK
5151

5252

5353
@app.route("/xslt6")
@@ -76,4 +76,4 @@ def h():
7676

7777
f = StringIO('<foo><bar></bar></foo>')
7878
tree = etree.parse(f)
79-
result = tree.xslt(xslt_root, a="'A'") # OK
79+
result = tree.xslt(xslt_root, a="'A'") # OK

0 commit comments

Comments
 (0)