Skip to content

Commit a9bea63

Browse files
committed
recognize more HTML attribute concatenations
1 parent 5fb76df commit a9bea63

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

javascript/ql/src/semmle/javascript/security/dataflow/IncompleteHtmlAttributeSanitizationCustomizations.qll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,11 @@ module IncompleteHtmlAttributeSanitization {
5151
string lhs;
5252

5353
HtmlAttributeConcatenation() {
54-
lhs = this.getPreviousLeaf().getStringValue().regexpCapture("(.*)=\"[^\"]*", 1) and
55-
this.getNextLeaf().getStringValue().regexpMatch(".*\".*")
54+
lhs = this.getPreviousLeaf().getStringValue().regexpCapture("((?:[\n\r]|.)*)=\"[^\"]*", 1) and
55+
(
56+
this.getNextLeaf().getStringValue().regexpMatch(".*\".*") or
57+
this.getRoot().getConstantStringParts().regexpMatch("(?:[\n\r]|.)*</.*")
58+
)
5659
}
5760

5861
/**

0 commit comments

Comments
 (0)