@weldsuite/helpdesk-widget-sdk 1.0.13 → 1.0.15
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/dist/angular.esm.js +11 -6
- package/dist/angular.esm.js.map +1 -1
- package/dist/angular.js +11 -6
- package/dist/angular.js.map +1 -1
- package/dist/index.esm.js +11 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +11 -6
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +11 -6
- package/dist/index.umd.js.map +1 -1
- package/dist/react.esm.js +11 -6
- package/dist/react.esm.js.map +1 -1
- package/dist/react.js +11 -6
- package/dist/react.js.map +1 -1
- package/dist/vue-composables.esm.js +11 -6
- package/dist/vue-composables.esm.js.map +1 -1
- package/dist/vue-composables.js +11 -6
- package/dist/vue-composables.js.map +1 -1
- package/package.json +1 -1
|
@@ -1025,11 +1025,7 @@ class SecurityManager {
|
|
|
1025
1025
|
* Validate message origin
|
|
1026
1026
|
*/
|
|
1027
1027
|
isOriginAllowed(origin) {
|
|
1028
|
-
//
|
|
1029
|
-
if (this.config.allowedOrigins?.length === 0) {
|
|
1030
|
-
return origin === window.location.origin;
|
|
1031
|
-
}
|
|
1032
|
-
// Check if origin is in allowed list
|
|
1028
|
+
// Check if origin is in allowed list (includes same-origin and programmatically added origins)
|
|
1033
1029
|
if (this.allowedOrigins.has(origin)) {
|
|
1034
1030
|
return true;
|
|
1035
1031
|
}
|
|
@@ -1248,6 +1244,15 @@ class MessageBroker {
|
|
|
1248
1244
|
this.logger = logger.child('[MessageBroker]');
|
|
1249
1245
|
this.iframeManager = iframeManager;
|
|
1250
1246
|
this.security = new SecurityManager(config.security, this.logger);
|
|
1247
|
+
// Automatically trust messages from the widget's base URL
|
|
1248
|
+
// The iframes load from api.baseUrl, so we must accept their postMessages
|
|
1249
|
+
try {
|
|
1250
|
+
const widgetOrigin = new URL(config.api.baseUrl).origin;
|
|
1251
|
+
this.security.addAllowedOrigin(widgetOrigin);
|
|
1252
|
+
}
|
|
1253
|
+
catch {
|
|
1254
|
+
// Invalid URL, will rely on configured allowedOrigins
|
|
1255
|
+
}
|
|
1251
1256
|
this.rateLimiter = new RateLimiter(100, 60000); // 100 messages per minute
|
|
1252
1257
|
// Bind handlers once for proper cleanup
|
|
1253
1258
|
this.boundHandleMessage = this.handleMessage.bind(this);
|
|
@@ -2183,7 +2188,7 @@ class StateCoordinator {
|
|
|
2183
2188
|
}
|
|
2184
2189
|
}
|
|
2185
2190
|
|
|
2186
|
-
var version = "1.0.
|
|
2191
|
+
var version = "1.0.15";
|
|
2187
2192
|
var packageJson = {
|
|
2188
2193
|
version: version};
|
|
2189
2194
|
|