From b6101aa5010b6ce0af0768522745e6f7a9183cb5 Mon Sep 17 00:00:00 2001 From: Arno Welzel Date: Sun, 8 Jul 2018 01:39:30 +0200 Subject: [PATCH 01/10] Added explanation how to add the required mimetype mapping. --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 4468089..68880b9 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,25 @@ This integrates the two with each other. Just click on a \*.kdbx file in Your Ne To update to a new version, simply repeat these steps. +## Mimetype detection + +Unfortunately, apps can't declare new mimetypes on the fly. To make +Keeweb work properly, you need to add a new mimetype in the +`mimetypemapping.json` file (at Nextcloud level). + +To proceed, just copy `/resources/config/mimetypemapping.dist.json` to +`/config/mimetypemapping.json` (in the `config/` folder at Nextcloud’s +root directory; the file should be stored next to the `config.php` +file). Afterwards add the two following line just after the “_comment” +lines. + + "kdbx": ["x-application/kdbx"], + +If all other mimetypes are not working properly, just run the +following command: + + sudo -u www-data php occ files:scan --all + ## Development setup ``` From 7a7ec5cc6a231aebc09059a9545b8a6e73c76429 Mon Sep 17 00:00:00 2001 From: Arno Welzel Date: Sun, 8 Jul 2018 01:41:21 +0200 Subject: [PATCH 02/10] Less confusing instructions. --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 68880b9..84dd8f6 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,7 @@ lines. "kdbx": ["x-application/kdbx"], -If all other mimetypes are not working properly, just run the -following command: +After that, run the following command: sudo -u www-data php occ files:scan --all From 873c4d777f4812c3342e0edb08a37a46f0c08839 Mon Sep 17 00:00:00 2001 From: Arno Welzel Date: Sun, 8 Jul 2018 13:58:29 +0200 Subject: [PATCH 03/10] Change compatibility information to support Nextcloud 13 as well. --- keeweb/appinfo/info.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keeweb/appinfo/info.xml b/keeweb/appinfo/info.xml index b96a5c2..4afb7f9 100644 --- a/keeweb/appinfo/info.xml +++ b/keeweb/appinfo/info.xml @@ -14,7 +14,7 @@ https://github.com/jhass/nextcloud-keeweb https://cloud.aeshna.de/u/mrzyx/keeweb.gif - + From aafe929c0505d0e081b324ad5b2a6dd8d5988054 Mon Sep 17 00:00:00 2001 From: Arno Welzel Date: Sat, 8 Dec 2018 20:54:05 +0100 Subject: [PATCH 04/10] Adjust maximum tested Nextcloud version. --- keeweb/appinfo/info.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keeweb/appinfo/info.xml b/keeweb/appinfo/info.xml index 4afb7f9..c66837c 100644 --- a/keeweb/appinfo/info.xml +++ b/keeweb/appinfo/info.xml @@ -14,7 +14,7 @@ https://github.com/jhass/nextcloud-keeweb https://cloud.aeshna.de/u/mrzyx/keeweb.gif - + From dabab4ac92b689e362a5455c85eadd4e0d0dd08b Mon Sep 17 00:00:00 2001 From: Arno Welzel Date: Tue, 15 Jan 2019 15:48:25 +0100 Subject: [PATCH 05/10] Adjust maximum supported version. --- keeweb/appinfo/info.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keeweb/appinfo/info.xml b/keeweb/appinfo/info.xml index c66837c..9d655dd 100644 --- a/keeweb/appinfo/info.xml +++ b/keeweb/appinfo/info.xml @@ -14,7 +14,7 @@ https://github.com/jhass/nextcloud-keeweb https://cloud.aeshna.de/u/mrzyx/keeweb.gif - + From 6e7ac94bde12c1a031f2345afcf7f6dc59b1bdd8 Mon Sep 17 00:00:00 2001 From: Arno Welzel Date: Tue, 15 Jan 2019 18:57:13 +0100 Subject: [PATCH 06/10] Updated instructions for mimetype registration. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 84dd8f6..7a24aa1 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,8 @@ To update to a new version, simply repeat these steps. Unfortunately, apps can't declare new mimetypes on the fly. To make Keeweb work properly, you need to add a new mimetype in the -`mimetypemapping.json` file (at Nextcloud level). +`mimetypemapping.json` file (also see the Nextcloud manual at +https://docs.nextcloud.com/server/14/admin_manual/configuration_mimetypes/index.html). To proceed, just copy `/resources/config/mimetypemapping.dist.json` to `/config/mimetypemapping.json` (in the `config/` folder at Nextcloud’s From 912680424cf15d3bdeb417100d3e389ec4799da4 Mon Sep 17 00:00:00 2001 From: Arno Welzel Date: Wed, 16 Jan 2019 11:44:10 +0100 Subject: [PATCH 07/10] Update README.md Updated explanation how to add the custom MIME type for Keeweb. --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 7a24aa1..0c5b52f 100644 --- a/README.md +++ b/README.md @@ -22,13 +22,14 @@ Keeweb work properly, you need to add a new mimetype in the `mimetypemapping.json` file (also see the Nextcloud manual at https://docs.nextcloud.com/server/14/admin_manual/configuration_mimetypes/index.html). -To proceed, just copy `/resources/config/mimetypemapping.dist.json` to -`/config/mimetypemapping.json` (in the `config/` folder at Nextcloud’s -root directory; the file should be stored next to the `config.php` -file). Afterwards add the two following line just after the “_comment” -lines. - - "kdbx": ["x-application/kdbx"], +To proceed, create the file `/config/mimetypemapping.json` (in the `config/` folder at +Nextcloud’s root directory; the file should be stored next to the `config.php` +file) or modify the existing one. Make sure, it contains at least the following +lines: + + { + "kdbx": ["x-application/kdbx"] + } After that, run the following command: From 22b807c0970dfae59629e0d3ba689dd251515b97 Mon Sep 17 00:00:00 2001 From: Arno Welzel Date: Wed, 16 Jan 2019 18:45:52 +0100 Subject: [PATCH 08/10] Clarify how to use the occ command --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c5b52f..90fff43 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,8 @@ lines: "kdbx": ["x-application/kdbx"] } -After that, run the following command: +After that, run the following command in the root directory of Nextcloud on the server +(if needed, replace `www-data` with the actual user which is used by the webserver): sudo -u www-data php occ files:scan --all From 62f10a4cb5fc2b8e036862fd2fa1c86f234226fd Mon Sep 17 00:00:00 2001 From: Arno Welzel Date: Sat, 26 Jan 2019 18:57:27 +0100 Subject: [PATCH 09/10] Changed link to current Nextcloud 15 manual. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 90fff43..66f5b9a 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ To update to a new version, simply repeat these steps. Unfortunately, apps can't declare new mimetypes on the fly. To make Keeweb work properly, you need to add a new mimetype in the `mimetypemapping.json` file (also see the Nextcloud manual at -https://docs.nextcloud.com/server/14/admin_manual/configuration_mimetypes/index.html). +https://docs.nextcloud.com/server/15/admin_manual/configuration_mimetypes/index.html). To proceed, create the file `/config/mimetypemapping.json` (in the `config/` folder at Nextcloud’s root directory; the file should be stored next to the `config.php` From 02d0519b5c73d934712faecb2b41893020c0ba25 Mon Sep 17 00:00:00 2001 From: Arno Welzel Date: Sun, 27 Jan 2019 12:03:06 +0100 Subject: [PATCH 10/10] Fix warning for deprecated setting in CSP --- keeweb/controller/pagecontroller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keeweb/controller/pagecontroller.php b/keeweb/controller/pagecontroller.php index 20954b6..4f38dc2 100644 --- a/keeweb/controller/pagecontroller.php +++ b/keeweb/controller/pagecontroller.php @@ -43,7 +43,7 @@ public function index($open) { // Override default CSP $csp = new ContentSecurityPolicy(); $csp->addAllowedFrameDomain("'self'"); - $csp->addAllowedChildSrcDomain("'self'"); + $csp->addAllowedWorkerSrcDomain("'self'"); $response->setContentSecurityPolicy($csp); return $response; }