@openui5/sap.ui.support 1.108.48 → 1.108.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRDPARTY.txt +1 -1
- package/package.json +6 -6
- package/src/sap/ui/support/.library +1 -1
- package/src/sap/ui/support/RuleAnalyzer.js +1 -1
- package/src/sap/ui/support/jQuery.sap.support.js +1 -1
- package/src/sap/ui/support/library.js +2 -2
- package/src/sap/ui/support/supportRules/RuleSet.js +1 -1
- package/src/sap/ui/support/supportRules/Storage.js +1 -1
- package/src/sap/ui/support/supportRules/WindowCommunicationBus.js +60 -19
- package/src/sap/ui/support/supportRules/ui/controllers/PresetsController.js +1 -1
- package/src/sap/ui/support/supportRules/util/EvalUtils.js +6 -9
package/THIRDPARTY.txt
CHANGED
|
@@ -292,7 +292,7 @@ License: MIT
|
|
|
292
292
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
|
293
293
|
Contained in: src/sap.ui.core/src/sap/ui/thirdparty/bignumber.js
|
|
294
294
|
|
|
295
|
-
Component: lodash, version: 4.17.
|
|
295
|
+
Component: lodash, version: 4.17.23
|
|
296
296
|
Copyright: OpenJS Foundation and other contributors
|
|
297
297
|
License: MIT
|
|
298
298
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.support",
|
|
3
|
-
"version": "1.108.
|
|
3
|
+
"version": "1.108.50",
|
|
4
4
|
"description": "OpenUI5 UI Library sap.ui.support",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"url": "https://github.com/SAP/openui5.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@openui5/sap.m": "1.108.
|
|
18
|
-
"@openui5/sap.ui.codeeditor": "1.108.
|
|
19
|
-
"@openui5/sap.ui.core": "1.108.
|
|
20
|
-
"@openui5/sap.ui.fl": "1.108.
|
|
21
|
-
"@openui5/sap.ui.layout": "1.108.
|
|
17
|
+
"@openui5/sap.m": "1.108.50",
|
|
18
|
+
"@openui5/sap.ui.codeeditor": "1.108.50",
|
|
19
|
+
"@openui5/sap.ui.core": "1.108.50",
|
|
20
|
+
"@openui5/sap.ui.fl": "1.108.50",
|
|
21
|
+
"@openui5/sap.ui.layout": "1.108.50"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2026 SAP SE or an SAP affiliate company.
|
|
8
8
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
9
|
-
<version>1.108.
|
|
9
|
+
<version>1.108.50</version>
|
|
10
10
|
|
|
11
11
|
<documentation>UI5 library: sap.ui.support</documentation>
|
|
12
12
|
|
|
@@ -35,7 +35,7 @@ sap.ui.define(["sap/ui/thirdparty/jquery",
|
|
|
35
35
|
* @deprecated Since version 1.60.0. Please use sap/ui/support/RuleAnalyzer instead.
|
|
36
36
|
* @alias jQuery.sap.support
|
|
37
37
|
* @author SAP SE
|
|
38
|
-
* @version 1.108.
|
|
38
|
+
* @version 1.108.50
|
|
39
39
|
* @public
|
|
40
40
|
*/
|
|
41
41
|
jQuery.sap.support = {
|
|
@@ -23,7 +23,7 @@ sap.ui.define(["sap/ui/core/library"],
|
|
|
23
23
|
* @namespace
|
|
24
24
|
* @alias sap.ui.support
|
|
25
25
|
* @author SAP SE
|
|
26
|
-
* @version 1.108.
|
|
26
|
+
* @version 1.108.50
|
|
27
27
|
* @since 1.50
|
|
28
28
|
* @public
|
|
29
29
|
*/
|
|
@@ -37,7 +37,7 @@ sap.ui.define(["sap/ui/core/library"],
|
|
|
37
37
|
controls: [],
|
|
38
38
|
elements: [],
|
|
39
39
|
noLibraryCSS: true,
|
|
40
|
-
version: "1.108.
|
|
40
|
+
version: "1.108.50",
|
|
41
41
|
extensions: {
|
|
42
42
|
//Configuration used for rule loading of Support Assistant
|
|
43
43
|
"sap.ui.support": {
|
|
@@ -39,7 +39,7 @@ function (Log, Version, library, storage, constants) {
|
|
|
39
39
|
* @name sap.ui.support.RuleSet
|
|
40
40
|
* @memberof sap.ui.support
|
|
41
41
|
* @author SAP SE
|
|
42
|
-
* @version 1.108.
|
|
42
|
+
* @version 1.108.50
|
|
43
43
|
* @param {object} oSettings Name of the initiated
|
|
44
44
|
* @returns {void}
|
|
45
45
|
*/
|
|
@@ -26,7 +26,7 @@ sap.ui.define([
|
|
|
26
26
|
* @name sap.ui.support.WindowCommunicationBus
|
|
27
27
|
* @memberof sap.ui.support
|
|
28
28
|
* @author SAP SE
|
|
29
|
-
* @version 1.108.
|
|
29
|
+
* @version 1.108.50
|
|
30
30
|
* @private
|
|
31
31
|
*/
|
|
32
32
|
var WindowCommunicationBus = BaseObject.extend("sap.ui.support.supportRules.WindowCommunicationBus", {
|
|
@@ -142,38 +142,79 @@ sap.ui.define([
|
|
|
142
142
|
};
|
|
143
143
|
|
|
144
144
|
/**
|
|
145
|
-
*
|
|
146
|
-
*
|
|
145
|
+
* Compare the origins of two URLs. Returns false if either value is not a valid URL.
|
|
146
|
+
* @private
|
|
147
|
+
* @param {string} sOriginA First URL string
|
|
148
|
+
* @param {string} sOriginB Second URL string
|
|
149
|
+
* @returns {boolean} true if both URLs have the same origin
|
|
150
|
+
*/
|
|
151
|
+
WindowCommunicationBus._compareOrigins = function (sOriginA, sOriginB) {
|
|
152
|
+
try {
|
|
153
|
+
return new URL(sOriginA).origin === new URL(sOriginB).origin;
|
|
154
|
+
} catch (e) {
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Validate messages received from external windows.
|
|
161
|
+
* Both directions are validated:
|
|
162
|
+
* - Tool frame: validates origin of messages from opener window
|
|
163
|
+
* - Application window: validates origin, frame identifier, and URL path of messages from tool frame
|
|
147
164
|
* @private
|
|
148
165
|
* @method
|
|
149
166
|
* @param {EventListener} eMessage Event fired by the channels attached to the WindowCommunicationBus
|
|
150
167
|
* @returns {boolean} true if the message is valid
|
|
151
168
|
*/
|
|
152
169
|
WindowCommunicationBus.prototype._validate = function (eMessage) {
|
|
170
|
+
// 1. Validate origin
|
|
171
|
+
// tool frame: validate against the configured opener origin
|
|
153
172
|
if (isEmptyObject(this._frame)) {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
173
|
+
var sExpectedOrigin = this._oConfig.getOrigin();
|
|
174
|
+
|
|
175
|
+
if (sExpectedOrigin) {
|
|
176
|
+
return WindowCommunicationBus._compareOrigins(eMessage.origin, sExpectedOrigin);
|
|
177
|
+
}
|
|
178
|
+
|
|
157
179
|
return true;
|
|
158
180
|
}
|
|
159
181
|
|
|
160
|
-
//
|
|
161
|
-
|
|
182
|
+
// application window: validate against the known tool frame origin
|
|
183
|
+
if (!WindowCommunicationBus._compareOrigins(eMessage.origin, this._frame.origin)) {
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
162
186
|
|
|
163
|
-
//
|
|
164
|
-
|
|
187
|
+
// 2. Validate frame identifier
|
|
188
|
+
if (eMessage.data._frameIdentifier !== this._frame.identifier) {
|
|
189
|
+
return false;
|
|
190
|
+
}
|
|
165
191
|
|
|
166
|
-
//
|
|
167
|
-
|
|
168
|
-
|
|
192
|
+
// 3. Validate URL path
|
|
193
|
+
// Compare parsed pathnames to avoid substring-matching attacks.
|
|
194
|
+
// The frame URL may be absolute or relative — strip query string and relative segments
|
|
195
|
+
// to extract the path portion, then verify the message origin's pathname ends with it.
|
|
196
|
+
try {
|
|
197
|
+
var oOriginUrl = new URL(eMessage.data._origin);
|
|
198
|
+
var iFrameUrlQuery = this._frame.url.indexOf("?");
|
|
199
|
+
var sFrameUrlWithoutQuery = this._frame.url.substring(0, iFrameUrlQuery).replace(/\.\.\//g, "").replace(/\.\//g, "");
|
|
200
|
+
|
|
201
|
+
// extract just the pathname: parse as URL if absolute, otherwise use the cleaned string as-is
|
|
202
|
+
var sFramePath;
|
|
203
|
+
try {
|
|
204
|
+
sFramePath = new URL(sFrameUrlWithoutQuery).pathname;
|
|
205
|
+
} catch (e) {
|
|
206
|
+
// relative URL — use cleaned string directly as a path suffix
|
|
207
|
+
sFramePath = sFrameUrlWithoutQuery;
|
|
208
|
+
}
|
|
169
209
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
210
|
+
if (!oOriginUrl.pathname.endsWith(sFramePath)) {
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
} catch (e) {
|
|
214
|
+
return false;
|
|
215
|
+
}
|
|
175
216
|
|
|
176
|
-
return
|
|
217
|
+
return true;
|
|
177
218
|
};
|
|
178
219
|
|
|
179
220
|
WindowCommunicationBus.prototype._getFrameIdentifier = function () {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* eslint-disable no-
|
|
1
|
+
/* eslint-disable no-new-func */
|
|
2
2
|
|
|
3
3
|
/*!
|
|
4
4
|
* OpenUI5
|
|
@@ -11,9 +11,10 @@ sap.ui.define([], function () {
|
|
|
11
11
|
|
|
12
12
|
var bIsEvalAllowed;
|
|
13
13
|
|
|
14
|
-
// Checks if
|
|
14
|
+
// Checks if the Function constructor can be used in the current platform (based on CSP restrictions)
|
|
15
15
|
try {
|
|
16
|
-
|
|
16
|
+
// eslint-disable-next-line no-new
|
|
17
|
+
new Function("");
|
|
17
18
|
bIsEvalAllowed = true;
|
|
18
19
|
} catch (e) {
|
|
19
20
|
bIsEvalAllowed = false;
|
|
@@ -34,11 +35,7 @@ sap.ui.define([], function () {
|
|
|
34
35
|
* @throws Error why eval failed, for example invalid syntax
|
|
35
36
|
*/
|
|
36
37
|
evalFunction: function (sFunction) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
eval("fn = " + sFunction);
|
|
40
|
-
|
|
41
|
-
return fn;
|
|
38
|
+
return new Function("return (" + sFunction + ")")();
|
|
42
39
|
}
|
|
43
40
|
};
|
|
44
|
-
});
|
|
41
|
+
});
|