Python: Minor doc fixes from review

This commit is contained in:
Rasmus Wriedt Larsen
2020-06-26 12:06:31 +02:00
parent 22ad8f717f
commit 08384e30af
2 changed files with 4 additions and 3 deletions

View File

@@ -7,7 +7,7 @@
</overview>
<recommendation>
<p>
This vulnerability can be prevented by not allowing untrusted user input to be passed as a XSL stylesheet.
This vulnerability can be prevented by not allowing untrusted user input to be passed as an XSL stylesheet.
If the application logic necessiates processing untrusted XSL stylesheets, the input should be properly filtered and sanitized before use.
</p>
</recommendation>

View File

@@ -41,6 +41,7 @@ module XSLTInjection {
}
private predicate etreeXML(ControlFlowNode fromnode, CallNode tonode) {
// etree.XML("<xmlContent>")
exists(CallNode call | call.getFunction().(AttrNode).getObject("XML").pointsTo(etree()) |
call.getArg(0) = fromnode and
call = tonode
@@ -48,7 +49,7 @@ module XSLTInjection {
}
private predicate etreeFromString(ControlFlowNode fromnode, CallNode tonode) {
// fromstring(text, parser=None)
// etree.fromstring(text, parser=None)
exists(CallNode call | call.getFunction().(AttrNode).getObject("fromstring").pointsTo(etree()) |
call.getArg(0) = fromnode and
call = tonode
@@ -56,7 +57,7 @@ module XSLTInjection {
}
private predicate etreeFromStringList(ControlFlowNode fromnode, CallNode tonode) {
// fromstringlist(strings, parser=None)
// etree.fromstringlist(strings, parser=None)
exists(CallNode call |
call.getFunction().(AttrNode).getObject("fromstringlist").pointsTo(etree())
|