From e7ba8904793e0764ab7f3129fa5c92e4ea9baef5 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 18 Nov 2019 14:56:46 +0100 Subject: [PATCH 1/5] Fix href re-encryption on setPadTitle --- www/common/outer/userObject.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/common/outer/userObject.js b/www/common/outer/userObject.js index 6ba0cd6d2..dd1f30692 100644 --- a/www/common/outer/userObject.js +++ b/www/common/outer/userObject.js @@ -45,6 +45,8 @@ define([ var ids = id ? [id] : exp.findChannels([channel]); ids.forEach(function (i) { var data = exp.getFileData(i, true); + var oldHref = exp.getHref(data); + if (oldHref === href) { return; } data.href = exp.cryptor.encrypt(href); }); }; From fd36825f451af0407aa242f2546ef07553f3fbaa Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 19 Nov 2019 12:07:05 +0100 Subject: [PATCH 2/5] Fix Team Drive is read only even for owners #464 --- www/common/outer/sharedfolder.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/common/outer/sharedfolder.js b/www/common/outer/sharedfolder.js index e4d8d152c..b6b961428 100644 --- a/www/common/outer/sharedfolder.js +++ b/www/common/outer/sharedfolder.js @@ -309,7 +309,9 @@ define([ isNewChannel: Store.isNewChannel }, id, sf, waitFor()); }); - }).nThen(waitFor()); + }).nThen(function () { + setTimeout(waitFor()); + }); }; return SF; From a297336746870d398be11da7ac3421802e7cbaf0 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 19 Nov 2019 14:01:56 +0100 Subject: [PATCH 3/5] Fix broken link in cryptpad-docker.md --- docs/cryptpad-docker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cryptpad-docker.md b/docs/cryptpad-docker.md index 12018902e..5998dc143 100644 --- a/docs/cryptpad-docker.md +++ b/docs/cryptpad-docker.md @@ -2,7 +2,7 @@ Cryptpad includes support for building a Docker image and running it to provide a Cryptpad instance. You can manage the container manually, or let Docker Compose manage it for you. -A full tutorial is available [on the Cryptpad Github wiki](https://github.com/xwiki-labs/cryptpad/wiki/Docker-(with-Nginx-and-Traefik)). This document provides a brief overview. +A full tutorial is available [on the Cryptpad Github wiki](https://github.com/xwiki-labs/cryptpad/wiki/Docker). This document provides a brief overview. ## Features From da328644132aebfc11850d660da875a1d7c57428 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 19 Nov 2019 15:45:37 +0100 Subject: [PATCH 4/5] Fix other read-only teams issues --- www/common/outer/profile.js | 4 ++-- www/common/outer/team.js | 10 +--------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/www/common/outer/profile.js b/www/common/outer/profile.js index 0e1e1f35e..dd56db6e9 100644 --- a/www/common/outer/profile.js +++ b/www/common/outer/profile.js @@ -20,11 +20,11 @@ define([ } profile.edit = Hash.getEditHashFromKeys(secret); profile.view = Hash.getViewHashFromKeys(secret); - cb(); + setTimeout(cb); }); return; } - cb(); + setTimeout(cb); }; var openChannel = function (ctx) { diff --git a/www/common/outer/team.js b/www/common/outer/team.js index b1be2baea..314d33f88 100644 --- a/www/common/outer/team.js +++ b/www/common/outer/team.js @@ -25,10 +25,6 @@ define([ var Nacl = window.nacl; - var initializeTeams = function (ctx, cb) { - cb(); - }; - var registerChangeEvents = function (ctx, team, proxy, fId) { if (!team) { return; } if (!fId) { @@ -338,7 +334,7 @@ define([ }; var openChannel = function (ctx, teamData, id, _cb) { - var cb = Util.once(_cb); + var cb = Util.once(Util.mkAsync(_cb)); var hash = teamData.hash || teamData.roHash; var secret = Hash.getSecrets('team', hash, teamData.password); @@ -1277,10 +1273,6 @@ define([ var teams = store.proxy.teams = store.proxy.teams || {}; - initializeTeams(ctx, waitFor(function (err) { - if (err) { return; } - })); - // Listen for changes in our access rights (if another worker receives edit access) ctx.store.proxy.on('change', ['teams'], function (o, n, p) { if (p[2] !== 'hash') { return; } From 1e2b2a27cfc4118b55a7d85c5a6c1da188ee7fcd Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 19 Nov 2019 17:55:33 +0100 Subject: [PATCH 5/5] Fix synchronous nthen callback --- www/common/outer/sharedfolder.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/outer/sharedfolder.js b/www/common/outer/sharedfolder.js index b6b961428..28780065a 100644 --- a/www/common/outer/sharedfolder.js +++ b/www/common/outer/sharedfolder.js @@ -21,7 +21,8 @@ define([ // No version: visible edit // Version 2: encrypted edit links - SF.checkMigration = function (secondaryKey, proxy, uo, cb) { + SF.checkMigration = function (secondaryKey, proxy, uo, _cb) { + var cb = Util.once(Util.mkAsync(_cb)); var drive = proxy.drive || proxy; // View access: can't migrate if (!secondaryKey) { return void cb(); }