Skip to content

Commit 213e17a

Browse files
committed
tests
1 parent 41ac329 commit 213e17a

File tree

6 files changed

+6
-11
lines changed

6 files changed

+6
-11
lines changed

javascript/frameworks/ui5/ext/ui5.model.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ extensions:
9393
- ["UI5HTMLControl", "Argument[0].Member[content]", "ui5-html-injection"]
9494
- ["UI5HTMLControl", "Member[content]", "ui5-html-injection"]
9595
- ["UI5HTMLControl", "Member[setContent].Argument[0]", "ui5-html-injection"]
96-
- ["sap/ui/richtexteditor/RichTextEditor", "Argument[0].Member[value]", "ui5-html-injection"]
9796
- ["sap/ui/richtexteditor/RichTextEditor", "Member[value]", "ui5-html-injection"]
9897
- ["sap/ui/richtexteditor/RichTextEditor", "Member[setValue].Argument[0]", "ui5-html-injection"]
9998
- ["Patcher", "Member[unsafeHtml].Argument[0..]", "ui5-html-injection"]

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,6 @@ class UI5Control extends TUI5Control {
844844
*/
845845
predicate isHTMLSanitized() {
846846
this.getControlTypeName() = "sap/ui/richtexteditor/RichTextEditor" and
847-
this.isSanitizePropertySetTo("sanitizeValue", true) and
848847
not this.isSanitizePropertySetTo("sanitizeValue", false)
849848
or
850849
this.getControlTypeName() = "sap/ui/core/HTML" and
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
| sink1.xml:6:5:6:44 | content={path: '/input'} | The binding path `content={path: '/input'}` is an HTML injection sink. |
2-
| sink1.xml:8:5:8:51 | value={path: '/input'} | The binding path `value={path: '/input'}` is an HTML injection sink. |
2+
| sink1.xml:8:5:8:73 | value={path: '/input'} | The binding path `value={path: '/input'}` is an HTML injection sink. |

javascript/frameworks/ui5/test/models/sink/sink.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ sap.ui.define(
126126
var value = sap.ui.core.util.File.save(code0, code1, "csv", "text/plain", code4, code5);
127127
var value = sap.ui.core.util.File.save(code0, code1, code2, code3, code4, code5);
128128

129-
var obj = new HTML({ content: code0, sanitizeContent: true });
129+
var obj = new HTML({ content: code0, sanitizeContent: true }); // FP
130130
var obj = new HTML({ content: code0, sanitizeContent: false });
131131

132132
var obj = new RichTextEditor({ value: code0 });
133-
var obj = new RichTextEditor({ value: code0, sanitizeValue: true });
134-
var obj = new RichTextEditor({ value: code0, sanitizeValue: false });
133+
var obj = new RichTextEditor({ value: code0, sanitizeValue: true });
134+
var obj = new RichTextEditor({ value: code0, sanitizeValue: false }); // FN
135135
},
136136
);

javascript/frameworks/ui5/test/models/sink/sink1.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
xmlns:rte="sap.ui.richtexteditor">
66
<core:HTML content="{path: '/input'}"/> <!--XSS sink sap.ui.core.HTML.content -->
77
<core:HTML content="{path: '/input'}" sanitizeContent="true"/> <!--sanitized XSS sink sap.ui.core.HTML.content -->
8-
<rte:RichTextEditor value="{path: '/input'}"/> <!--XSS sink sap.ui.core.HTML.content -->
9-
<rte:RichTextEditor value="{path: '/input'}" sanitizeValue="true"/> <!--sanitized XSS sink sap.ui.core.HTML.content -->
8+
<rte:RichTextEditor value="{path: '/input'}" sanitizeValue="false"/> <!--XSS sink sap.ui.core.HTML.content -->
9+
<rte:RichTextEditor value="{path: '/input'}"/> <!--sanitized XSS sink sap.ui.core.HTML.content -->
1010
</mvc:View>

javascript/frameworks/ui5/test/models/sink/xssSinkTest.expected

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,3 @@
1212
| sink.js:113:32:113:36 | code0 | code0 |
1313
| sink.js:129:35:129:39 | code0 | code0 |
1414
| sink.js:130:35:130:39 | code0 | code0 |
15-
| sink.js:132:43:132:47 | code0 | code0 |
16-
| sink.js:133:43:133:47 | code0 | code0 |
17-
| sink.js:134:43:134:47 | code0 | code0 |

0 commit comments

Comments
 (0)