Skip to content

Commit 5a454bb

Browse files
committed
Add comment
1 parent c78d02d commit 5a454bb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ql/lib/codeql/ruby/frameworks/XmlParsing.qll

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,19 @@ private class NokogiriXmlParserCall extends XmlParserCall::Range, DataFlow::Call
2525
this.getArgument(3) =
2626
[trackEnableFeature(TNOENT()), trackEnableFeature(TDTDLOAD()), trackDisableFeature(TNONET())]
2727
or
28+
// calls to methods that enable/disable features in a block argument passed to this parser call.
29+
// For example:
30+
// ```ruby
31+
// doc.parse(...) { |options| options.nononet; options.noent }
32+
// ```
2833
this.asExpr()
2934
.getExpr()
3035
.(MethodCall)
3136
.getBlock()
3237
.getAStmt()
3338
.getAChild*()
3439
.(MethodCall)
35-
.getMethodName() = ["noent", "nononet"]
40+
.getMethodName() = ["noent", "dtdload", "nononet"]
3641
}
3742
}
3843

0 commit comments

Comments
 (0)