From 96a47992e040f86e1896872bef15c7a677384e66 Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 3 May 2021 21:50:34 -0400 Subject: [PATCH 01/11] Add an issue template for "Initial instance configuration" --- .../initial-instance-configuration.md | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/initial-instance-configuration.md diff --git a/.github/ISSUE_TEMPLATE/initial-instance-configuration.md b/.github/ISSUE_TEMPLATE/initial-instance-configuration.md new file mode 100644 index 000000000..ed7f6ca43 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/initial-instance-configuration.md @@ -0,0 +1,55 @@ +--- +name: Initial instance configuration +about: Difficulty configuring a CryptPd instance +title: CONFIG +labels: configuration +assignees: '' + +--- + +We receive many issues from people that have tried to set up a new CryptPad instance that does not load any of the interactive editors or which mostly works but has particular problems with the sheet editor. + +Before you create an issue: + +## See your instance's checkup page + +If your instance is able to at least partially load some pages then you should be able to access the diagnostic page `http(s):///checkup/`. It will perform some automated tests of your instance's configuration and will provide hints indicating: + +1. what is incorrect about your configuration +2. what to change in order to correct the problem + +## Write down the exact steps you followed to configure your instance + +0. Provide the URL of the guide you followed +1. Confirm that your system has the necessary pre-requisites + * Did you fetch the source code with `git` as recommended? + * Have you installed the recommend version of Nodejs (12.14.0) using [NVM](https://github.com/nvm-sh/nvm)? + * Have you installed `bower` using `npm`? + * Have you fetched the latest source code? Run `git branch` and confirm that it returns either `main` or [the latest of our releases](github.com/xwiki-labs/cryptpad/releases/latest). +2. Did you copy `cryptpad/config/config.example.js` to `cryptpad/config/config.js`, read the comments, and edit the fields which are described as being necessary for a production environment? +3. Did you restart the application server (`server.js`) after making configuration changes? +4. Are you running NGINX as a reverse proxy as we recommend? +5. Have you generated an SSL certificate that is valid for both the domains that are required by the sandboxing system? +6. Do the domains in your NGINX conf match those in `cryptpad/config/config.js`? + +## Review the steps you took + +If the answer to any of the above questions is _No_ then that is the most likely cause of your difficulty. + +Identifying the problem on your own reduces the time we spend answering GitHub issues and leaves more time to fix actual bugs and develop new features. + +## Confirm that the problem stems from your instance and not from your browser + +Not all browsers support CryptPad correctly, and various browser extensions interfere with its intended behaviour. + +https://CryptPad.fr is a good reference point that you can use to confirm that your browser can load a correctly configured instance. If you can't load CryptPad.fr then the problem may be with your browser, its configuration, or one of its active extensions. + +## Create a detailed report + +If you believe you've done all of those steps correctly then proceed with creating an issue with the following: + +0. A concise description of the problem you're experiencing and why you believe it stems from a bug in the software and not a configuration issue +1. The list of all the steps you wrote down when following our instructions above +2. A link to your instance so we can easily load your `/checkup/` page for ourselves +3. A list of any errors visible in your browser's console on whichever page is not behaving as expected +4. A list of any further steps you've taken to debug the problem on your own From 37fd98305a0ef133e11850dbbd15a923011f93fb Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 3 May 2021 21:51:33 -0400 Subject: [PATCH 02/11] fix a typo --- .github/ISSUE_TEMPLATE/initial-instance-configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/initial-instance-configuration.md b/.github/ISSUE_TEMPLATE/initial-instance-configuration.md index ed7f6ca43..f3b66257f 100644 --- a/.github/ISSUE_TEMPLATE/initial-instance-configuration.md +++ b/.github/ISSUE_TEMPLATE/initial-instance-configuration.md @@ -1,6 +1,6 @@ --- name: Initial instance configuration -about: Difficulty configuring a CryptPd instance +about: Difficulty configuring a CryptPad instance title: CONFIG labels: configuration assignees: '' From 5ba3f8f954e4f741febc2033808521d2d429a8b1 Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 3 May 2021 21:52:14 -0400 Subject: [PATCH 03/11] Update initial-instance-configuration.md --- .github/ISSUE_TEMPLATE/initial-instance-configuration.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/initial-instance-configuration.md b/.github/ISSUE_TEMPLATE/initial-instance-configuration.md index f3b66257f..00c54918e 100644 --- a/.github/ISSUE_TEMPLATE/initial-instance-configuration.md +++ b/.github/ISSUE_TEMPLATE/initial-instance-configuration.md @@ -53,3 +53,5 @@ If you believe you've done all of those steps correctly then proceed with creati 2. A link to your instance so we can easily load your `/checkup/` page for ourselves 3. A list of any errors visible in your browser's console on whichever page is not behaving as expected 4. A list of any further steps you've taken to debug the problem on your own + +Finally, remove the text of this issue template and leave only the content you've written. From e192f668a17dac0c4448091b483d791982396bd7 Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 3 May 2021 21:53:19 -0400 Subject: [PATCH 04/11] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index e28e69132..76981253b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,6 +1,6 @@ --- name: Bug report -about: Create a report to help us improve +about: Report a bug in the software title: '' labels: '' assignees: '' From 2b2675c6976fcb70d3e45e99d1e131b0700ce4da Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 3 May 2021 23:29:21 +0200 Subject: [PATCH 05/11] Translated using Weblate (German) Currently translated at 100.0% (1228 of 1228 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/de/ --- www/common/translations/messages.de.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/common/translations/messages.de.json b/www/common/translations/messages.de.json index 3a7e1d5c1..3f7b628c1 100644 --- a/www/common/translations/messages.de.json +++ b/www/common/translations/messages.de.json @@ -1226,5 +1226,7 @@ "calendar": "Kalender", "calendar_before": "vorher", "calendar_weekNumber": "Woche {0}", - "oo_cantMigrate": "Diese Tabelle überschreitet die maximale Größe für hochgeladene Dateien und kann nicht migriert werden." + "oo_cantMigrate": "Diese Tabelle überschreitet die maximale Größe für hochgeladene Dateien und kann nicht migriert werden.", + "toolbar_storeInDrive": "In CryptDrive speichern", + "genericCopySuccess": "In die Zwischenablage kopiert" } From 9c399c83ea2634a86f8519cecceecd6bf9237a75 Mon Sep 17 00:00:00 2001 From: Weblate Date: Tue, 4 May 2021 07:46:05 +0200 Subject: [PATCH 06/11] Translated using Weblate (French) Currently translated at 100.0% (1229 of 1229 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/fr/ --- www/common/translations/messages.fr.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/translations/messages.fr.json b/www/common/translations/messages.fr.json index e17729dc3..4620265c1 100644 --- a/www/common/translations/messages.fr.json +++ b/www/common/translations/messages.fr.json @@ -1228,5 +1228,6 @@ "settings_padOpenLinkHint": "Cette option permet d'ouvrir les liens dans un document texte sans fenêtre d’aperçu", "settings_padOpenLinkTitle": "Ouvrir les lien avec un seul clic", "toolbar_storeInDrive": "Stocker dans CryptDrive", - "genericCopySuccess": "Copié dans le presse-papiers" + "genericCopySuccess": "Copié dans le presse-papiers", + "mediatag_defaultImageName": "image" } From 06a6d2f2fb4a06ead97d0fa70622903880ab0244 Mon Sep 17 00:00:00 2001 From: Weblate Date: Tue, 4 May 2021 07:46:05 +0200 Subject: [PATCH 07/11] Translated using Weblate (English) Currently translated at 100.0% (1229 of 1229 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ --- www/common/translations/messages.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json index b8c70c56a..4cb54075c 100644 --- a/www/common/translations/messages.json +++ b/www/common/translations/messages.json @@ -1228,5 +1228,6 @@ "calendar_addNotification": "Add reminder", "calendar_noNotification": "None", "toolbar_storeInDrive": "Store in CryptDrive", - "genericCopySuccess": "Copied to clipboard" + "genericCopySuccess": "Copied to clipboard", + "mediatag_defaultImageName": "image" } From 3be0b439bd02776d6c31eece10cf4b49c3e08bfc Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 4 May 2021 11:25:12 +0530 Subject: [PATCH 08/11] translate default image name --- www/common/inner/common-mediatag.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/inner/common-mediatag.js b/www/common/inner/common-mediatag.js index 9f7506d61..966724fa1 100644 --- a/www/common/inner/common-mediatag.js +++ b/www/common/inner/common-mediatag.js @@ -431,7 +431,7 @@ define([ else if ($this.hasClass("cp-app-code-context-download")) { if ($mt.is('pre.mermaid') || $mt.is('pre.markmap')) { (function () { - var name = 'image.svg'; // XXX + var name = Messages.mediatag_defaultImageName + '.svg'; var svg = $mt.find('svg')[0].cloneNode(true); $(svg).attr('xmlns', 'http://www.w3.org/2000/svg').attr('width', $mt.width()).attr('height', $mt.height()); $(svg).find('foreignObject').each(function (i, el) { @@ -454,7 +454,7 @@ define([ } if ($mt.is('pre.mathjax')) { (function () { - var name = 'image.png'; // XXX + var name = Messages.mediatag_defaultImageName + '.png'; var svg = $mt.find('> span > svg')[0]; var clone = svg.cloneNode(true); var html = clone.outerHTML; From 01523219928c2f1429f2528db8bb166653b43a3b Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 4 May 2021 11:56:02 +0530 Subject: [PATCH 09/11] check that the size of an encrypted upload will be within the upload limit before encrypting --- www/common/sframe-common-file.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/sframe-common-file.js b/www/common/sframe-common-file.js index 4274a5538..1286da14d 100644 --- a/www/common/sframe-common-file.js +++ b/www/common/sframe-common-file.js @@ -129,8 +129,8 @@ define([ var l = privateData.plan ? ApiConfig.premiumUploadSize : false; l = l || ApiConfig.maxUploadSize || "?"; var maxSizeStr = Util.bytesToMegabytes(l); - // XXX blob.byteLength is wrong: we should use the lenght of the encrypted content (see whiteboard) - if (blob && blob.byteLength && typeof(l) === "number" && blob.byteLength > l) { + var estimate = FileCrypto.computeEncryptedSize((blob && blob.byteLength) || 0, metadata); + if (blob && blob.byteLength && typeof(estimate) === 'number' && typeof(l) === "number" && estimate > l) { $pv.text(Messages.error); queue.inProgress = false; queue.next(); From 62f163f887bed05acc24f493137bca412767c743 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 4 May 2021 12:45:21 +0530 Subject: [PATCH 10/11] avoid duplicated emails on contact page --- customize.dist/pages/contact.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/customize.dist/pages/contact.js b/customize.dist/pages/contact.js index 88a5053e3..b86ad4480 100644 --- a/customize.dist/pages/contact.js +++ b/customize.dist/pages/contact.js @@ -7,8 +7,13 @@ define([ ], function (Config, h, Msg, Pages, LocalStore) { return function () { - var adminEmail = Config.adminEmail && Config.adminEmail !== 'i.did.not.read.my.config@cryptpad.fr'; + var developerEmail = "contact@cryptpad.fr"; + var adminEmail = Config.adminEmail && [ + 'i.did.not.read.my.config@cryptpad.fr', + developerEmail + ].indexOf(Config.adminEmail) === -1; var adminMailbox = Config.supportMailbox && LocalStore.isLoggedIn(); + return h('div#cp-main', [ Pages.infopageTopbar(), h('div.container.cp-container', [ @@ -110,7 +115,7 @@ define([ ) ), h('div.col-12.col-sm-6.col-md-3.col-lg-3', - h('a.card', {href : "mailto:contact@cryptpad.fr"}, + h('a.card', {href : "mailto:" + developerEmail}, h('div.card-body', h('p', [ h('img', { From 07307a417f0518390f1385d8188ea6e778a26670 Mon Sep 17 00:00:00 2001 From: Weblate Date: Tue, 4 May 2021 09:57:37 +0200 Subject: [PATCH 11/11] Translated using Weblate (English) Currently translated at 100.0% (1230 of 1230 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ --- www/common/translations/messages.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json index 4cb54075c..74c129281 100644 --- a/www/common/translations/messages.json +++ b/www/common/translations/messages.json @@ -1229,5 +1229,6 @@ "calendar_noNotification": "None", "toolbar_storeInDrive": "Store in CryptDrive", "genericCopySuccess": "Copied to clipboard", - "mediatag_defaultImageName": "image" + "mediatag_defaultImageName": "image", + "register_registrationIsClosed": "Registration is closed." }