From 3a91f7c06d19a8755fb88881d4b628b877ab40e7 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 8 Mar 2021 11:25:23 +0100 Subject: [PATCH 1/9] Fix team avatar --- www/common/outer/team.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/common/outer/team.js b/www/common/outer/team.js index f959ee11b..2634e483f 100644 --- a/www/common/outer/team.js +++ b/www/common/outer/team.js @@ -1046,6 +1046,7 @@ define([ if (!team) { return void cb ({error: 'ENOENT'}); } if (team.offline) { return void cb({error: 'OFFLINE'}); } if (!team.roster) { return void cb({error: 'NO_ROSTER'}); } + delete data.metadata.offline; team.roster.metadata(data.metadata, function (err) { if (err) { return void cb({error: err}); } var localTeam = ctx.store.proxy.teams[teamId]; From 942efcae07aa4c67d41c062df885aef8b2b5444a Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 8 Mar 2021 11:26:10 +0100 Subject: [PATCH 2/9] Fix type error --- www/common/outer/async-store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index 091d9a6ad..5953194d3 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -2665,7 +2665,7 @@ define([ loadUniversal(Messenger, 'messenger', waitFor); store.messenger = store.modules['messenger']; loadUniversal(Profile, 'profile', waitFor); - store.modules['team'].onReady(waitFor); + if (store.modules['team']) { store.modules['team'].onReady(waitFor); } loadUniversal(History, 'history', waitFor); }).nThen(function () { var requestLogin = function () { From 543115b9938aad990cc601dfdc62a1b07ca5b178 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 5 Mar 2021 16:52:42 +0100 Subject: [PATCH 3/9] Force .md extensions to be recognized as markdown when uploading a file --- www/common/sframe-common-file.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/www/common/sframe-common-file.js b/www/common/sframe-common-file.js index bb700e7a6..fb432b5ad 100644 --- a/www/common/sframe-common-file.js +++ b/www/common/sframe-common-file.js @@ -428,6 +428,11 @@ define([ if (handleFileState.inProgress) { return void handleFileState.queue.push([file, e, defaultOptions]); } handleFileState.inProgress = true; + var type = file.type; + if (!file.type && /\.md$/.test(file.name)) { + type = "text/markdown"; + } + var thumb; var file_arraybuffer; var name = file.name; @@ -438,7 +443,7 @@ define([ if (!abort) { var metadata = { name: name, - type: file.type, + type: type, }; if (thumb) { metadata.thumbnail = thumb; } queue.push({ From 61b8830df4b5ec3d8eb6c4f5ddf9adfe2039109b Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 8 Mar 2021 12:04:02 +0100 Subject: [PATCH 4/9] Fix snapshots in sheets --- www/common/sframe-common-outer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index 7ecf9fa35..3d19b9a0a 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -1735,7 +1735,7 @@ define([ var cpNfCfg = { sframeChan: sframeChan, channel: secret.channel, - versionHash: parsed.hashData && parsed.hashData.versionHash, + versionHash: cfg.type !== 'oo' && parsed.hashData && parsed.hashData.versionHash, padRpc: Cryptpad.padRpc, validateKey: secret.keys.validateKey || undefined, isNewHash: isNewHash, From 8fc5647aea46e75dbbce7fd770c33ec7dde12bae Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 8 Mar 2021 12:07:46 +0100 Subject: [PATCH 5/9] Guard against possible type error --- www/common/outer/team.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/outer/team.js b/www/common/outer/team.js index 2634e483f..31785e26b 100644 --- a/www/common/outer/team.js +++ b/www/common/outer/team.js @@ -1046,7 +1046,7 @@ define([ if (!team) { return void cb ({error: 'ENOENT'}); } if (team.offline) { return void cb({error: 'OFFLINE'}); } if (!team.roster) { return void cb({error: 'NO_ROSTER'}); } - delete data.metadata.offline; + if (data.metadata) { delete data.metadata.offline; } team.roster.metadata(data.metadata, function (err) { if (err) { return void cb({error: err}); } var localTeam = ctx.store.proxy.teams[teamId]; From 5c688c8e774c143e0fb98f3b708eef018372e63d Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 8 Mar 2021 12:38:32 +0100 Subject: [PATCH 6/9] Update changelog and version --- CHANGELOG.md | 12 ++++++++++++ customize.dist/pages.js | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03beab596..81918d5dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# 4.2.1 + +This minor release addresses a few bugs discovered after deploying 4.2.0: + +* The 4.2.0 release included major improvements to the sheet application. This introduced breaking changes to the "lock" system in the application. Existing spreadsheets (before 4.2.0) that were closed by a user without "unlocking" all cells first became impossible to open after the 4.2.0 changes. This has been fixed. +* Team owners can now properly upload a team avatar. +* We've improved the file upload script to better recognize markdown files. +* We've fixed a few issues resulting in an error screen: + * New users were unable to create a drive without registering first. + * Snapshots in the sheet application couldn't be loaded. + * Loading an existing drive as an unregistered user could fail. + # 4.2.0 (C) ## Goals diff --git a/customize.dist/pages.js b/customize.dist/pages.js index 708041915..3ea9606d6 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -62,7 +62,7 @@ define([ var imprintUrl = AppConfig.imprint && (typeof(AppConfig.imprint) === "boolean" ? '/imprint.html' : AppConfig.imprint); - Pages.versionString = "v4.2.0"; + Pages.versionString = "v4.2.1"; // used for the about menu Pages.imprintLink = AppConfig.imprint ? footLink(imprintUrl, 'imprint') : undefined; From b6a5e0399f1b7157c9eafd3e61f5d1ba33b01475 Mon Sep 17 00:00:00 2001 From: Weblate Date: Tue, 9 Mar 2021 11:52:14 +0100 Subject: [PATCH 7/9] Translated using Weblate (French) Currently translated at 100.0% (1214 of 1214 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/fr/ --- www/common/translations/messages.fr.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/translations/messages.fr.json b/www/common/translations/messages.fr.json index 1d244ca74..3def9c46e 100644 --- a/www/common/translations/messages.fr.json +++ b/www/common/translations/messages.fr.json @@ -493,7 +493,7 @@ "mdToolbar_check": "Liste de tâches", "mdToolbar_code": "Code", "home_host": "Ceci est une instance communautaire et indépendante de CryptPad.", - "main_catch_phrase": "Outils collaboratifs,
chiffrés et open source", + "main_catch_phrase": "Outils collaboratifs
chiffrés de bout en bout et open source", "footer_aboutUs": "À propos", "about": "À propos", "privacy": "Charte de confidentialité", From 771b8e645874b1dab0c6a2cbdd91510aeda8d134 Mon Sep 17 00:00:00 2001 From: Weblate Date: Tue, 9 Mar 2021 11:52:14 +0100 Subject: [PATCH 8/9] Translated using Weblate (English) Currently translated at 100.0% (1214 of 1214 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ --- www/common/translations/messages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json index 876dc26a6..fd4a746d0 100644 --- a/www/common/translations/messages.json +++ b/www/common/translations/messages.json @@ -508,7 +508,7 @@ "mdToolbar_code": "Code", "mdToolbar_toc": "Table of Contents", "home_host": "This is an independent community instance of CryptPad.", - "main_catch_phrase": "Collaboration suite,
encrypted and open-source", + "main_catch_phrase": "Collaboration suite
end-to-end encrypted and open-source", "footer_aboutUs": "About us", "about": "About", "privacy": "Privacy Policy", From a17e7324738374bebb2832e4cc7de435e0517d74 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 10 Mar 2021 17:40:42 +0100 Subject: [PATCH 9/9] Add XXX --- lib/hk-util.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/hk-util.js b/lib/hk-util.js index b66e7e0b9..8780addcd 100644 --- a/lib/hk-util.js +++ b/lib/hk-util.js @@ -893,6 +893,7 @@ HK.onChannelMessage = function (Env, Server, channel, msgStruct, cb) { // more straightforward and reliable. if (Array.isArray(id) && id[2] && id[2] === channel.lastSavedCp) { // Reject duplicate checkpoints + // XXX not an error? the checkpoint is already here so we can assume it's stored return void cb('DUPLICATE'); } }