Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-12-07 20:46:52 +0300
committerLukas Reschke <lukas@statuscode.ch>2016-12-07 20:46:52 +0300
commit92a0eed917196d34d8076b177af54e99880662e3 (patch)
treebc8008a79d0b7f739c62ddb668395644b08de77f
parent7ff4d5bb52d942ff9c2c96085181b26b92404e35 (diff)
Whitelist wopi URL for iframes1.1.23
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
-rw-r--r--appinfo/app.php12
-rw-r--r--appinfo/info.xml2
2 files changed, 12 insertions, 2 deletions
diff --git a/appinfo/app.php b/appinfo/app.php
index 8650a508..bafc3467 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -22,7 +22,8 @@
namespace OCA\Richdocuments\AppInfo;
-//Script for registering file actions
+use OC\Security\CSP\ContentSecurityPolicy;
+
$eventDispatcher = \OC::$server->getEventDispatcher();
$eventDispatcher->addListener(
'OCA\Files::loadAdditionalScripts',
@@ -47,5 +48,14 @@ if (class_exists('\OC\Files\Type\TemplateManager')) {
$manager->registerTemplate('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'apps/richdocuments/assets/pptxtemplate.pptx');
}
+// Whitelist the wopi URL for iframes, required for Firefox
+$wopiUrl = \OC::$server->getConfig()->getAppValue('richdocuments', 'wopi_url');
+if ($wopiUrl !== '') {
+ $manager = \OC::$server->getContentSecurityPolicyManager();
+ $policy = new ContentSecurityPolicy();
+ $policy->addAllowedFrameDomain($wopiUrl);
+ $manager->addDefaultPolicy($policy);
+}
+
// Listen to delete file signal
\OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA\Richdocuments\Storage", "onDelete");
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 15f5ff99..36969f55 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -5,7 +5,7 @@
<description>Collabora Online allows you to to work with all kinds of office documents directly in your browser. This application requires Collabora Cloudsuite to be installed on one of your servers, please read the documentation to learn more about that.</description>
<summary>Edit office documents directly in your browser.</summary>
<licence>AGPL</licence>
- <version>1.1.22</version>
+ <version>1.1.23</version>
<author>Collabora Productivity based on work of Frank Karlitschek, Victor Dubiniuk</author>
<bugs>https://github.com/nextcloud/richdocuments/issues</bugs>
<repository type="git">https://github.com/nextcloud/richdocuments.git</repository>