From be7c25e02f5d4f1a00571aa2f71cf59760d4add4 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 2 Jun 2021 15:44:20 +0300 Subject: [PATCH 1/2] Fix embedded mode for filling forms --- apps/api/documents/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 2db589f2d..52503867a 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -866,7 +866,7 @@ path += app + "/"; path += (config.type === "mobile" || isSafari_mobile) ? "mobile" - : (config.type === "embedded" || (app=='documenteditor') && (config.document.permissions.fillForms===true) && (config.document.permissions.edit === false) && (config.editorConfig.mode !== 'view')) + : (config.type === "embedded" || (app=='documenteditor') && config.document.permissions && (config.document.permissions.fillForms===true) && (config.document.permissions.edit === false) && (config.editorConfig.mode !== 'view')) ? "embed" : "main"; From ae35a1b94f570efa9a2757e0f77aa7986965392e Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 2 Jun 2021 15:46:22 +0300 Subject: [PATCH 2/2] Fix Bug 50696 --- apps/common/Gateway.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/Gateway.js b/apps/common/Gateway.js index 436f0032b..14c1704f7 100644 --- a/apps/common/Gateway.js +++ b/apps/common/Gateway.js @@ -151,7 +151,7 @@ if (window.Common === undefined) { var _onMessage = function(msg) { // TODO: check message origin - if (msg.origin !== window.parentOrigin && msg.origin !== window.location.origin) return; + if (msg.origin !== window.parentOrigin && msg.origin !== window.location.origin && !(msg.origin==="null" && (window.parentOrigin==="file://" || window.location.origin==="file://"))) return; var data = msg.data; if (Object.prototype.toString.apply(data) !== '[object String]' || !window.JSON) {