Skip to content

Commit 744bf21

Browse files
Update javascript/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5/UI5View.qll
Co-authored-by: Jeongsoo Lee <[email protected]>
1 parent 6baa2d7 commit 744bf21

File tree

1 file changed

+7
-8
lines changed
  • javascript/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5

1 file changed

+7
-8
lines changed

javascript/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5/UI5View.qll

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -852,15 +852,14 @@ class UI5Control extends TUI5Control {
852852
)
853853
}
854854

855-
bindingset[val]
856-
private UI5Control sanitizeContentSetTo(boolean val) {
857-
/* 1. `sanitizeContent` attribute is set declaratively. */
858-
result.getProperty("sanitizeContent").toString() = val.toString()
855+
private predicate sanitizeContentSetTo(boolean val) {
856+
this.getAReference().getAPropertyWrite("sanitizeContent").getRhs().mayHaveBooleanValue(val)
859857
or
860-
/* 2. `sanitizeContent` attribute is set programmatically using setProperty(). */
861-
exists(CallNode node | node = result.getAReference().getAMemberCall("setProperty") |
862-
node.getArgument(0).getStringValue() = "sanitizeContent" and
863-
not node.getArgument(1).mayHaveBooleanValue(val.booleanNot())
858+
exists(CallNode setPropertyCall |
859+
setPropertyCall = this.getAReference().getAMemberCall("setProperty")
860+
|
861+
setPropertyCall.getArgument(0).getStringValue() = "sanitizeContent" and
862+
setPropertyCall.getArgument(1).mayHaveBooleanValue(val)
864863
)
865864
}
866865
}

0 commit comments

Comments
 (0)