Skip to content

Commit 21a91b4

Browse files
committed
fix review comments
1 parent e5da220 commit 21a91b4

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ extensions:
115115
data:
116116
- ["UI5InputControl", "Member[value]", "remote"]
117117
- ["UI5InputControl", "Member[getValue].ReturnValue", "remote"]
118+
- ["UI5HTMLControl", "Member[getContent].ReturnValue", "remote"]
118119
- ["UI5CodeEditor", "Member[value]", "remote"]
119120
- ["UI5CodeEditor", "Member[getCurrentValue].ReturnValue", "remote"]
120121
- ["global", "Member[jQuery].Member[sap].Member[syncHead,syncGet,syncGetText,syncPost,syncPostText].ReturnValue", "remote"]

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,24 @@ class UI5Control extends TUI5Control {
223223
}
224224
}
225225

226+
class XmlControlProperty extends XmlAttribute {
227+
XmlControlProperty() { exists(UI5Control control | this.getElement() = control.asXmlControl()) }
228+
}
229+
230+
bindingset[qualifiedTypeUri]
231+
predicate isBuiltInControl(string qualifiedTypeUri) {
232+
exists(string namespace |
233+
namespace =
234+
[
235+
"sap\\.m.*", // https://sapui5.hana.ondemand.com/#/api/sap.m: The main UI5 control library, with responsive controls that can be used in touch devices as well as desktop browsers.
236+
"sap\\.f.*", // https://sapui5.hana.ondemand.com/#/api/sap.f: SAPUI5 library with controls specialized for SAP Fiori apps.
237+
"sap\\.ui.*" // https://sapui5.hana.ondemand.com/#/api/sap.ui: The sap.ui namespace is the central OpenAjax compliant entry point for UI related JavaScript functionality provided by SAP.
238+
]
239+
|
240+
qualifiedTypeUri.regexpMatch(namespace)
241+
)
242+
}
243+
226244
private newtype TUI5ControlProperty =
227245
TXmlControlProperty(XmlAttribute property) or
228246
TJsonControlProperty(JsonValue property) or

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

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -225,24 +225,6 @@ private UI5ExternalModel getExternalModelNode(UI5BindingPath bindingPath) {
225225
inSameWebApp(bindingPath.getLocation().getFile(), result.getFile())
226226
}
227227

228-
class XmlControlProperty extends XmlAttribute {
229-
XmlControlProperty() { exists(UI5Control control | this.getElement() = control.asXmlControl()) }
230-
}
231-
232-
bindingset[qualifiedTypeUri]
233-
predicate isBuiltInControl(string qualifiedTypeUri) {
234-
exists(string namespace |
235-
namespace =
236-
[
237-
"sap\\.m.*", // https://sapui5.hana.ondemand.com/#/api/sap.m: The main UI5 control library, with responsive controls that can be used in touch devices as well as desktop browsers.
238-
"sap\\.f.*", // https://sapui5.hana.ondemand.com/#/api/sap.f: SAPUI5 library with controls specialized for SAP Fiori apps.
239-
"sap\\.ui.*" // https://sapui5.hana.ondemand.com/#/api/sap.ui: The sap.ui namespace is the central OpenAjax compliant entry point for UI related JavaScript functionality provided by SAP.
240-
]
241-
|
242-
qualifiedTypeUri.regexpMatch(namespace)
243-
)
244-
}
245-
246228
/**
247229
* A UI5 View that might include XSS sources and sinks in standard controls.
248230
*/

javascript/frameworks/ui5/test/queries/UI5Xss/xss-html-control-sanitized/UI5Xss.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ edges
1818
#select
1919
| webapp/controller/app.controller.js:16:35:16:62 | oModel. ... input') | webapp/view/app.view.xml:5:5:7:28 | value={/input} | webapp/controller/app.controller.js:16:35:16:62 | oModel. ... input') | XSS vulnerability due to $@. | webapp/view/app.view.xml:5:5:7:28 | value={/input} | user-provided value |
2020
| webapp/controller/app.controller.js:19:36:19:63 | oModel. ... input') | webapp/view/app.view.xml:5:5:7:28 | value={/input} | webapp/controller/app.controller.js:19:36:19:63 | oModel. ... input') | XSS vulnerability due to $@. | webapp/view/app.view.xml:5:5:7:28 | value={/input} | user-provided value |
21+
| webapp/controller/app.controller.js:20:35:20:58 | unsanit ... ntent() | webapp/controller/app.controller.js:20:35:20:58 | unsanit ... ntent() | webapp/controller/app.controller.js:20:35:20:58 | unsanit ... ntent() | XSS vulnerability due to $@. | webapp/controller/app.controller.js:20:35:20:58 | unsanit ... ntent() | user-provided value |
2122
| webapp/controller/app.controller.js:20:35:20:58 | unsanit ... ntent() | webapp/view/app.view.xml:5:5:7:28 | value={/input} | webapp/controller/app.controller.js:20:35:20:58 | unsanit ... ntent() | XSS vulnerability due to $@. | webapp/view/app.view.xml:5:5:7:28 | value={/input} | user-provided value |

0 commit comments

Comments
 (0)