Skip to content

Commit dde1bde

Browse files
committed
Add log-entry-flows-to-notifications
1 parent 014f5dd commit dde1bde

File tree

10 files changed

+107
-0
lines changed

10 files changed

+107
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodes
2+
edges
3+
#select
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
UI5LogInjection/UI5LogInjection.ql

javascript/frameworks/ui5/test/queries/UI5LogInjection/log-entry-flows-to-notifications/package-lock.json

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "sap-ui5-xss",
3+
"version": "1.0.0",
4+
"main": "index.js",
5+
"dependencies": {
6+
"@sapui5/sap.ui.vk": "^1.124.0"
7+
}
8+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
specVersion: '3.0'
2+
metadata:
3+
name: sap-ui5-xss
4+
type: application
5+
framework:
6+
name: SAPUI5
7+
version: "1.115.0"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
sap.ui.define([
2+
"sap/ui/core/mvc/Controller",
3+
"sap/ui/model/json/JSONModel"
4+
], function (Controller, JSONModel) {
5+
"use strict";
6+
return Controller.extend("codeql-sap-js.controller.app", {
7+
onInit: function () {
8+
var oData = {
9+
input: null,
10+
output: null,
11+
};
12+
var oModel = new JSONModel(oData);
13+
this.getView().setModel(oModel);
14+
15+
var input = oModel.getProperty('/input');
16+
17+
jQuery.sap.log.debug(input); //log-injection sink
18+
}
19+
});
20+
}
21+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
6+
<meta charset="utf-8">
7+
<title>SAPUI5 XSS</title>
8+
<script src="https://sdk.openui5.org/resources/sap-ui-core.js"
9+
data-sap-ui-libs="sap.m"
10+
data-sap-ui-onInit="module:codeql-sap-js/index"
11+
data-sap-ui-resourceroots='{
12+
"codeql-sap-js": "./"
13+
}'>
14+
</script>
15+
</head>
16+
17+
<body class="sapUiBody" id="content">
18+
19+
</body>
20+
21+
</html>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
sap.ui.define([
2+
"sap/ui/core/mvc/XMLView"
3+
], function (XMLView) {
4+
"use strict";
5+
XMLView.create({
6+
viewName: "codeql-sap-js.view.app"
7+
}).then(function (oView) {
8+
oView.placeAt("content");
9+
});
10+
11+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"sap.app": {
3+
"id": "sap-ui5-xss"
4+
}
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<mvc:View controllerName="codeql-sap-js.controller.app"
2+
xmlns="sap.m"
3+
xmlns:core="sap.ui.core"
4+
xmlns:mvc="sap.ui.core.mvc"
5+
xmlns:vk="sap.ui.vk">
6+
<Input placeholder="Enter Payload"
7+
description="Try: &lt;img src=x onerror=alert(&quot;XSS&quot;)&gt;"
8+
value="{/input}" /> <!--User input source sap.m.Input.value -->
9+
<vk:Notifications/>
10+
</mvc:View>

0 commit comments

Comments
 (0)