diff --git a/CHANGELOG.md b/CHANGELOG.md index ce9059d04..56fae6b54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,38 @@ -# WIP +# 4.10.0 + +## Goals + + +## Update notes + +## Features + +* screen real-estate + * kanban + * narrower 'add board' button + * 'Tools' menu to collapse the tag and view mode UI + * general + * main toolbar collapse +* remove unused files + * /common/noscriptfix.js +* more detailed inventory of dependencies + * see cryptpad/www/lib/changelog.md +* include vendor and appVersion in support ticket data +* log when trimming history +* rewrite some translation keys to use a single syntax for BR tags +* translations + * more linting + * standardized capitalization of "CryptPad" + * avoid raw injection of HTML strictly for adding line breaks + * remove some unnecessary cases of raw HTML injection +* checkup + * better styles + * improved formatting for returned values in failed tests + * display browser and OS for when people send us screenshots instead of URLs + * test for support of some features in the browser (inside the sandbox) +* mark password inputs as _new passwords_ so that browsers don't suggest you input and share your account password + +## Bug fixes * Sheet export * most exports broken by Chrome 92, mostly fixed @@ -7,18 +41,14 @@ * some new browser-specific checkup tests to make it easier to detect future regressions in the APIs * drive bug fixes * guard against a few possible type errors -* screen real-estate - * kanban - * narrower 'add board' button - * 'Tools' menu to collapse the tag and view mode UI - * general - * main toolbar collapse + * "burn this drive" button works again in Firefox * clear login token 1. when you delete your account 2. when logging in -* remove unused files - * /common/noscriptfix.js -* include vendor and appVersion in support ticket data +* use single version of less.js on the client +* abort subsequent actions when metadata fails to load during owned channel archival +* handle warnings when trimming history (not just errors) +* filter channel ids with invalid lengths when generating a list of all channels you use # 4.9.0 diff --git a/customize.dist/pages.js b/customize.dist/pages.js index 18d65c680..fa183f90c 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -105,7 +105,7 @@ define([ var imprintUrl = AppConfig.imprint && (typeof(AppConfig.imprint) === "boolean" ? '/imprint.html' : AppConfig.imprint); - Pages.versionString = "v4.9.0"; + Pages.versionString = "v4.10.0"; // used for the about menu diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 0d1d94873..a4081e568 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -2,7 +2,7 @@ So you want to write a realtime collaborative application? This guide will focus on applications which require **multiple clients** to **collaboratively construct a single authoratative document**. -[XWiki-Labs](https://labs.xwiki.com/) has published an open source suite (called [Cryptpad](https://github.com/xwiki-labs/cryptpad)) of collaborative editors which employ end to end encryption. +[XWiki-Labs](https://labs.xwiki.com/) has published an open source suite (called [CryptPad](https://github.com/xwiki-labs/cryptpad)) of collaborative editors which employ end to end encryption. This guide will refer to the techniques used in the prototypes developed therein. Let's start with an overview of the components involved. @@ -75,7 +75,7 @@ Chainpad can handle out of order messages, but it performs best when its message By architecting your system such that all clients send to a server which then relays to other clients, you guarantee that a particular chain of patches is consistent between the participants of your session. -Cryptpad is capable of using a variety of data stores. +CryptPad is capable of using a variety of data stores. Which data store your instance employs can be [easily configured](https://github.com/xwiki-labs/cryptpad/blob/master/config.example.js). You simply need to write an adaptor which conforms to a simple API. @@ -85,7 +85,7 @@ Whether you decide to use a single server, or distribute messages across a netwo ## Transport -Cryptpad was initially written to use [websockets](https://en.wikipedia.org/wiki/WebSocket) for transportation of messages. +CryptPad was initially written to use [websockets](https://en.wikipedia.org/wiki/WebSocket) for transportation of messages. Since a relay server is indispensable in this model, that server doubles as the **History Keeper**, and implements a datastore. @@ -202,7 +202,7 @@ That isn't to say that there are no tradeoffs when keeping that information from ### Our Encryption Scheme -The encryption scheme employed by Cryptpad is a [symmetric encryption](https://en.wikipedia.org/wiki/Symmetric-key_algorithm) which utilizes a single [pre-shared-key](https://en.wikipedia.org/wiki/Pre-shared_key) known by all participants. +The encryption scheme employed by CryptPad is a [symmetric encryption](https://en.wikipedia.org/wiki/Symmetric-key_algorithm) which utilizes a single [pre-shared-key](https://en.wikipedia.org/wiki/Pre-shared_key) known by all participants. Encryption is complex, and poorly understood by the majority of those who use it on a daily basis. Pre-shared-keys are among the weakest possible cryptographic tools available today, however, few if any other encryption schemes scale to any number of users. diff --git a/package-lock.json b/package-lock.json index 42136e238..a3b92de86 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cryptpad", - "version": "4.9.0", + "version": "4.10.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 68a315891..a844167f5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "cryptpad", "description": "realtime collaborative visual editor with zero knowlege server", - "version": "4.9.0", + "version": "4.10.0", "license": "AGPL-3.0+", "repository": { "type": "git", @@ -45,7 +45,8 @@ "lint:js": "jshint --config .jshintrc --exclude-path .jshintignore .", "lint:server": "jshint --config .jshintrc lib", "lint:less": "./node_modules/lesshint/bin/lesshint -c ./.lesshintrc ./customize.dist/src/less2/", - "lint:translations": "node ./scripts/unused-translations.js", + "lint:translations": "node ./scripts/lint-translations.js", + "unused-translations": "node ./scripts/unused-translations.js", "test": "node scripts/TestSelenium.js", "test-rpc": "cd scripts/tests && node test-rpc", "template": "cd customize.dist/src && for page in ../index.html ../privacy.html ../terms.html ../contact.html ../what-is-cryptpad.html ../features.html ../../www/login/index.html ../../www/register/index.html ../../www/user/index.html;do echo $page; cp template.html $page; done;", diff --git a/readme.md b/readme.md index f4b979bf3..e6982a0fe 100644 --- a/readme.md +++ b/readme.md @@ -20,7 +20,7 @@ The most recent version and all past release notes can be found [here](https://g ## Setup using Docker -See [Cryptpad-Docker](https://github.com/xwiki-labs/cryptpad-docker) repository for details on how to get up-and-running with Cryptpad in Docker. This repository is maintained by the community and not officially supported. +See [CryptPad-Docker](https://github.com/xwiki-labs/cryptpad-docker) repository for details on how to get up-and-running with CryptPad in Docker. This repository is maintained by the community and not officially supported. # Security @@ -72,7 +72,7 @@ CryptPad is actively developed by a team at [XWiki SAS](https://www.xwiki.com), We love Open Source and we love contribution. Learn more about [contributing](https://docs.cryptpad.fr/en/how_to_contribute.html). -If you have any questions or comments, or if you're interested in contributing to Cryptpad, come say hi in our [Matrix channel](https://app.element.io/#/room/#cryptpad:matrix.xwiki.com). +If you have any questions or comments, or if you're interested in contributing to CryptPad, come say hi in our [Matrix channel](https://app.element.io/#/room/#cryptpad:matrix.xwiki.com). # License diff --git a/scripts/find-html-translations.js b/scripts/find-html-translations.js deleted file mode 100644 index 218342137..000000000 --- a/scripts/find-html-translations.js +++ /dev/null @@ -1,99 +0,0 @@ -var EN = require("../www/common/translations/messages.json"); - -var simpleTags = [ - '
', - '', - '', - - // FIXME - "", - '', - '

', - '

', - - // FIXME register_notes - '', - '
  • ', - '
  • ', - '', - '', -]; - -['a', 'b', 'em', 'p', 'i'].forEach(function (tag) { - simpleTags.push('<' + tag + '>'); - simpleTags.push(''); -}); - -// these keys are known to be problematic -var KNOWN_ISSUES = [ // FIXME - //'newVersion', - //'fm_info_anonymous', - //'register_notes', -]; - -var processLang = function (map, lang, primary) { - var announced = false; - var announce = function () { - if (announced) { return; } - announced = true; - console.log("NEXT LANGUAGE: ", lang); - }; - - Object.keys(map).forEach(function (k) { - if (!EN[k]) { return; } - if (KNOWN_ISSUES.indexOf(k) !== -1) { return; } - - var s = map[k]; - if (typeof(s) !== 'string') { return; } - var usesHTML; - - s.replace(/<.*?>/g, function (html) { - if (simpleTags.indexOf(html) !== -1) { return; } - announce(); - usesHTML = true; - if (!primary) { - console.log("{%s}", html); - } - }); - - if (usesHTML) { - announce(); - console.log("%s", s); - console.log("[%s]\n", k); - } - }); -}; - -processLang(EN, 'en', true); - -[ - 'ar', - //'bn_BD', - 'ca', - 'de', - 'es', - 'fi', - 'fr', - 'hi', - 'it', - 'ja', - 'nb', - 'nl', - 'pl', - 'pt-br', - 'ro', - 'ru', - 'sv', - //'te', - 'tr', - 'zh', -].forEach(function (lang) { - try { - var map = require("../www/common/translations/messages." + lang + ".json"); - if (!Object.keys(map).length) { return; } - processLang(map, lang); - } catch (err) { - console.error(err); - } -}); diff --git a/scripts/lint-translations.js b/scripts/lint-translations.js index a38cd615a..bc18dd724 100644 --- a/scripts/lint-translations.js +++ b/scripts/lint-translations.js @@ -1,8 +1,127 @@ -// TODO unify the following scripts - // unused-translations.js - // find-html-translations +var EN = require("../www/common/translations/messages.json"); -// more linting - // Search for 'Cryptpad' string (should be 'CryptPad') - // Search English for -ise\s +var simpleTags = [ + '
    ', + '
    ', + '', + // FIXME + "", + '', + '

    ', + '

    ', + + // FIXME register_notes + '', + '
  • ', + '
  • ', + '', + '', +]; + +['a', 'b', 'em', 'p', 'i'].forEach(function (tag) { + simpleTags.push('<' + tag + '>'); + simpleTags.push(''); +}); + +// these keys are known to be problematic +var KNOWN_ISSUES = [ // FIXME + //'newVersion', + //'fm_info_anonymous', + //'register_notes', +]; + +var special_rules = {}; + +special_rules.en = function (s) { + // Prefer the american -ize suffix for verbs rather than -ise + return /[^w]ise/.test(s); +}; + +special_rules.fr = function (s) { +/* + hacky regexp to check whether there are any instances of ':' + which do not have the preceding space as is expected. + ignore instances where the following character is a '/' + because this is probably a URL (http(s)://) +*/ + return /\S[:;\?\!][^\/]{1,}/.test(s); +}; + +var noop = function () {}; + +var processLang = function (map, lang, primary) { + var announced = false; + var announce = function () { + if (announced) { return; } + announced = true; + console.log("NEXT LANGUAGE: ", lang); + }; + + var special = special_rules[lang] || noop; + Object.keys(map).forEach(function (k) { + if (!EN[k]) { return; } + if (KNOWN_ISSUES.indexOf(k) !== -1) { return; } + + var s = map[k]; + if (typeof(s) !== 'string') { return; } + var usesHTML; + + s.replace(/<.*?>/g, function (html) { + if (simpleTags.indexOf(html) !== -1) { return; } + announce(); + usesHTML = true; + if (!primary) { + console.log("{%s}", html); + } + }); + + var weirdCapitalization; + s.replace(/cryptpad(\.fr)*/gi, function (brand) { + if (['CryptPad', 'cryptpad.fr'].includes(brand)) { return; } + weirdCapitalization = true; + }); + + var specialViolation = special(s); + + if (usesHTML || weirdCapitalization || specialViolation) { + announce(); + console.log("%s", s); + console.log("[%s]\n", k); + } + }); +}; + +processLang(EN, 'en', true); + +[ + 'ar', + //'bn_BD', + 'ca', + 'de', + 'es', + 'fi', + 'fr', + 'hi', + 'it', + 'ja', + 'nb', + 'nl', + 'pl', + 'pt-br', + 'ro', + 'ru', + 'sv', + //'te', + 'tr', + 'zh', +].forEach(function (lang) { + try { + var map = require("../www/common/translations/messages." + lang + ".json"); + if (!Object.keys(map).length) { return; } + processLang(map, lang); + } catch (err) { + console.error(err); + } +}); diff --git a/www/checkup/main.js b/www/checkup/main.js index a262d0e4c..3118be749 100644 --- a/www/checkup/main.js +++ b/www/checkup/main.js @@ -915,7 +915,7 @@ define([ var $progress = $('#cp-progress'); var versionStatement = function () { - return h('p.cp--notice-version', [ + return h('p.cp-notice-version', [ "This instance is running ", h('span.cp-app-checkup-version',[ "CryptPad", diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 19a124180..81327844f 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -526,6 +526,7 @@ define([ var button; var sframeChan = common.getSframeChannel(); var appType = (common.getMetadataMgr().getMetadata().type || 'pad').toUpperCase(); + data = data || {}; switch (type) { case 'export': button = $('