mirror of
https://github.com/github/codeql.git
synced 2026-05-01 11:45:14 +02:00
JS: fixup visibility of DataFlow::HtmlAttributeNode
This commit is contained in:
@@ -742,22 +742,21 @@ module DataFlow {
|
||||
/**
|
||||
* A data flow node representing an HTML attribute.
|
||||
*/
|
||||
private class HtmlAttributeNode extends DataFlow::Node, THtmlAttributeNode {
|
||||
class HtmlAttributeNode extends DataFlow::Node, THtmlAttributeNode {
|
||||
HTML::Attribute attr;
|
||||
|
||||
HtmlAttributeNode() { this = THtmlAttributeNode(attr) }
|
||||
|
||||
override string toString() { result = attr.toString() }
|
||||
|
||||
override ASTNode getAstNode() { none() }
|
||||
|
||||
override BasicBlock getBasicBlock() { none() }
|
||||
|
||||
override predicate hasLocationInfo(
|
||||
string filepath, int startline, int startcolumn, int endline, int endcolumn
|
||||
) {
|
||||
attr.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
|
||||
}
|
||||
|
||||
/** Gets the attribute corresponding to this data flow node. */
|
||||
HTML::Attribute getAttribute() { result = attr }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -203,7 +203,7 @@ module DomBasedXss {
|
||||
*/
|
||||
class VHtmlSink extends DomBasedXss::Sink {
|
||||
HTML::Attribute attr;
|
||||
VHtmlSink() { this = DataFlow::THtmlAttributeNode(attr) and attr.getName() = "v-html" }
|
||||
VHtmlSink() { this.(DataFlow::HtmlAttributeNode).getAttribute() = attr and attr.getName() = "v-html" }
|
||||
HTML::Attribute getAttr() {
|
||||
result = attr
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user