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"; 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) {