diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 8a1297856..000000000 --- a/.eslintignore +++ /dev/null @@ -1,40 +0,0 @@ -# SPDX-FileCopyrightText: 2023 XWiki CryptPad Team and contributors -# -# SPDX-License-Identifier: AGPL-3.0-or-later - -node_modules/ -www/components/ -www/bower_components/ -www/common/onlyoffice/dist -www/common/onlyoffice/x2t -onlyoffice-dist/ - -www/scratch -www/accounts -www/lib -www/accounts -www/worker -www/todo - -#lib/plugins/ - -www/common/hyperscript.js - -www/pad/wysiwygarea-plugin.js -www/pad/mediatag-plugin.js -www/pad/mediatag-plugin-dialog.js -www/pad/disable-base64.js -www/pad/wordcount/ - -www/kanban/jkanban.js -www/common/jscolor.js - -www/common/media-tag-nacl.min.js - -customize/ - -www/debug/chainpad.dist.js - -www/pad/mathjax/ -www/code/mermaid*.js -www/code/orgmode.js diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 209a4718e..000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,58 +0,0 @@ -// SPDX-FileCopyrightText: 2024 XWiki CryptPad Team and contributors -// -// SPDX-License-Identifier: AGPL-3.0-or-later - -module.exports = { - 'env': { - 'browser': true, - 'es2021': true, - 'node': true - }, - 'plugins': ['compat'], - 'extends': ['eslint:recommended', 'plugin:compat/recommended'], - "globals": { - "define": "readonly", - }, - 'overrides': [ - { - 'env': { - 'node': true - }, - 'files': [ - '.eslintrc.{js,cjs}' - ], - 'parserOptions': { - 'sourceType': 'script' - } - } - ], - 'parserOptions': { - 'ecmaVersion': 'latest' - }, - 'rules': { - 'indent': [ - 'off', // TODO enable this check - 4 - ], - 'linebreak-style': [ - 'error', - 'unix' - ], - 'quotes': [ - 'off', // TODO enable this check - 'single' - ], - 'semi': [ - 'error', - 'always' - ], - - // TODO remove these exceptions from the eslint defaults - 'no-irregular-whitespace': ['off'], - 'no-self-assign': ['off'], - 'no-empty': ['off'], - 'no-useless-escape': ['off'], - 'no-extra-boolean-cast': ['off'], - 'no-prototype-builtins': ['off'], - } -}; diff --git a/.github/ISSUE_TEMPLATE/bug_resolution.yml b/.github/ISSUE_TEMPLATE/bug_resolution.yml index da1a7c9d5..474070d59 100644 --- a/.github/ISSUE_TEMPLATE/bug_resolution.yml +++ b/.github/ISSUE_TEMPLATE/bug_resolution.yml @@ -89,19 +89,13 @@ body: label: Version description: What version of CryptPad are you running? options: + - 2024.12.0 + - 2024.9.1 + - 2024.9.0 + - 2024.6.1 - 2024.6.0 - 2024.3.1 - 2024.3.0 - - 5.7.0 - - 5.6.0 - - 5.5.0 - - 5.4.1 - - 5.4.0 - - 5.3.0 - - 5.2.1 - - 5.2.0 - - 5.1.0 - - 5.0.0 - Other validations: required: true diff --git a/.gitignore b/.gitignore index 323e7db9e..013a3e931 100644 --- a/.gitignore +++ b/.gitignore @@ -17,12 +17,11 @@ customize messages.log www/scratch data -pins/ -blob/ -block/ -blobstage/ -block/ -logs/ +pins +blob +block +blobstage +logs privileged.conf config/config.js config/sso.js @@ -33,6 +32,8 @@ www/common/onlyoffice/v* /onlyoffice-conf/ /onlyoffice-dist/ +_build + # ---> Node # Logs logs diff --git a/.reuse/dep5 b/.reuse/dep5 index bd6e25083..227d0b182 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -29,6 +29,10 @@ Files: .stylelintrc.js Copyright: 2023 XWiki CryptPad Team and contributors License: AGPL-3.0-or-later +Files: scripts/tests/test-data/* +Copyright: 2024 XWiki CryptPad Team and contributors +License: AGPL-3.0-or-later + ## Dependencies Files: www/common/theme/* diff --git a/.stylelintrc.js b/.stylelintrc.js index a1ea1103f..229ac427e 100644 --- a/.stylelintrc.js +++ b/.stylelintrc.js @@ -19,6 +19,7 @@ module.exports = { "declaration-block-no-shorthand-property-overrides": null, "comment-whitespace-inside": null, + "no-invalid-double-slash-comments": null, "property-no-vendor-prefix": null, "selector-no-vendor-prefix": null, diff --git a/CHANGELOG.md b/CHANGELOG.md index be2161b23..78d1e234d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,145 @@ SPDX-FileCopyrightText: 2023 XWiki CryptPad Team and cont SPDX-License-Identifier: AGPL-3.0-or-later --> +# Autumn release (2024.9.0) + +## Goals + +This release improves the performance of CryptPad with server optimizations and an optional cryptography plugin. We also include lots of improvements and fixes across various areas. + +## Features + +- Add support for cryptography plugins to replace tweetnacl on the server [#1667](https://github.com/cryptpad/cryptpad/pull/1667) + - We use our [CryptPad Sodium plugin](https://github.com/cryptpad/cryptpad-sodium-plugin) to improve the performance of our flagship instance cryptpad.fr. + - Documentation will be available shortly in the form of a blog post and section in the admin guide. + +## Improvements + +- Server memory improvements [#1543](https://github.com/cryptpad/cryptpad/pull/1543) +- Server optimization when computing metadata [#1566](https://github.com/cryptpad/cryptpad/pull/1566) +- Team roster channels slow down team members accounts [#1614](https://github.com/cryptpad/cryptpad/pull/1614) +- Deployment + - Add example configs for Caddy [#1603](https://github.com/cryptpad/cryptpad/pull/1603) + - Add support for HTTP -> HTTPS (80 -> 443 ports) redirection [#1582](https://github.com/cryptpad/cryptpad/pull/1582) + - Added "git config --add safe.directory" [#1539](https://github.com/cryptpad/cryptpad/pull/1539) +- Add confirmation modal when admins turn on mandatory 2FA [#1552](https://github.com/cryptpad/cryptpad/pull/1552) +- Developers on Windows can now launch their local instance with `npm run windev` + +## Fixes + +- Modals accessibility + - `Shift-Tab` option for `Ctrl-E` modals [#1647](https://github.com/cryptpad/cryptpad/pull/1647) + - Remove focus from disabled elements on modals [#1618](https://github.com/cryptpad/cryptpad/pull/1618) + - `+New` button fixes on Drive [#1610](https://github.com/cryptpad/cryptpad/pull/1610) + - Accessibility improvements to modals [#1563](https://github.com/cryptpad/cryptpad/pull/1563) + - `Ctrl+E` modal fixes [#1559](https://github.com/cryptpad/cryptpad/pull/1559) + - Focus style fixes [#1560](https://github.com/cryptpad/cryptpad/pull/1560) + - Make password change confirmation button responsive on mobile [#1569](https://github.com/cryptpad/cryptpad/pull/1569) +- Calendar + - Fix calendar ownership sharing bug [#1655](https://github.com/cryptpad/cryptpad/pull/1655) + - Calendar modal UI fixes [#1615](https://github.com/cryptpad/cryptpad/pull/1615) + - Make 'New Event' modal appear in user view for small screens [#1583](https://github.com/cryptpad/cryptpad/pull/1583) +- Teams + - Improve Teams card list accessibility [#1585](https://github.com/cryptpad/cryptpad/pull/1585) + - Fix emoji avatar handling and team name overflowing in sidebar teams [#1598](https://github.com/cryptpad/cryptpad/pull/1598) +- Toolbar/menus + - Make code history buttons not overlap on small screens [#1586](https://github.com/cryptpad/cryptpad/pull/1586) + - Fix misaligned/missing file dropdown menu items [#1578](https://github.com/cryptpad/cryptpad/pull/1578) +- Diagram + - Ignore unknown fields in diagram document [#1666](https://github.com/cryptpad/cryptpad/commit/02da76d3de76455a5573dd43d7ef6e68bf62c959) +- Forms + - Fix overflowing check and radio items in form app conditional [#1591](https://github.com/cryptpad/cryptpad/pull/1591) +- Kanban + - fixed a bug that was causing duplicate cards when many editors were collaborating [02da76d](https://github.com/cryptpad/cryptpad/commit/02da76d3de76455a5573dd43d7ef6e68bf62c959) +- OnlyOffice + - OnlyOffice document out of sync with multiple tabs as guest [#1671](https://github.com/cryptpad/cryptpad/issues/1671) +- Miscellaneous + - Fix ownership/sharing issues with password-protected pads [#1565](https://github.com/cryptpad/cryptpad/pull/1565) + - Make performance table responsive for mobile (admin panel) [#1555](https://github.com/cryptpad/cryptpad/pull/1555) + - Fix bash indentation and trailing whitespaces [#1548](https://github.com/cryptpad/cryptpad/pull/1548) + - Drive focus fixes [#1611](https://github.com/cryptpad/cryptpad/pull/1611) + + +## Dependencies + +We upgraded the following packages + +- cryptpad + - chainpad-server to `5.2.2` + - netflux-websocket to `1.2.1` +- third-party + - express to `4.21.0` + - http-proxy-middleware to `3.0.2` + - requirejs to `2.3.7` + - stylelint to `16.9.0` + + +## Upgrade notes + +If you are upgrading from a version older than `2024.6.1` please read the upgrade notes of all versions between yours and `2024.9.0` to avoid configuration issues. + +To upgrade: + +1. Stop your server +2. Get the latest code with git + +```bash +git fetch origin --tags +git checkout 2024.9.0 +npm ci +npm run install:components +./install-onlyoffice.sh +``` + +3. Restart your server +4. Review your instance's checkup page to ensure that you are passing all tests + + +# 2024.6.1 + +## Goals + +This is a bugfix release to address issues that were reported by Cryptpad.fr users. We took the opportunity to update the translations with some new languages contributed by the community. + +## Improvements + +- Translations update from CryptPad Translations [#1575](https://github.com/cryptpad/cryptpad/pull/1575) + - Added: Español cubano, اَلْعَرَبِيَّةُ Arabic, Svenska + - Removed some languages without enough coverage + - Greek (16%) + - Romanian (36%) + +## Fixes +- Calendar events sometimes don’t appear when created [#1551](https://github.com/cryptpad/cryptpad/issues/1551) fixed by [072dba2](https://github.com/cryptpad/cryptpad/commit/072dba254e3c2be32cd6b261d84510909deb713f) +- Revert the new method of counting registered users in the admin panel [4544be6](https://github.com/cryptpad/cryptpad/commit/4544be6b4d9fa7291b19cb366f7dd492dfe07340) +- Fix broken OnlyOffice Document [#1572](https://github.com/cryptpad/cryptpad/issues/1572) +- Fix printing in Code documents [#1557](https://github.com/cryptpad/cryptpad/pull/1557) [#1478](https://github.com/cryptpad/cryptpad/pull/1478) +- Fix OnlyOffice undefined functions [#1550](https://github.com/cryptpad/cryptpad/pull/1550) +- Fix keyboard operation of confirm modals [#1576](https://github.com/cryptpad/cryptpad/issues/1576) + - Pressing Enter on the "Cancel" button triggered the "OK" button instead + + +## Upgrade notes + +If you are upgrading from a version older than `2024.6.0` please read the upgrade notes of all versions between yours and `2024.6.1` to avoid configuration issues. + +To upgrade: + +1. Stop your server +2. Get the latest code with git + +```bash +git fetch origin --tags +git checkout 2024.6.1 +npm ci +npm run install:components +./install-onlyoffice.sh +``` + +3. Restart your server +4. Review your instance's checkup page to ensure that you are passing all tests + + # 2024.6.0 ## Goals @@ -14,7 +153,7 @@ This release introduces a new onboarding flow to guide administrators through th - Onboarding screens & app configuration [#1513](https://github.com/cryptpad/cryptpad/pull/1513) - Bahasa Indonesia is a new available language [fe78b6a](https://github.com/cryptpad/cryptpad/commit/fe78b6ab1dc76ce9eb8d5361c309db8e92117fa8) - - Thanks to our [Weblate](https://weblate.cryptpad.org) contributors who made that happen! + - Thanks to our [Weblate](https://weblate.cryptpad.org) contributors who made that happen! ## Improvements @@ -35,6 +174,7 @@ This release introduces a new onboarding flow to guide administrators through th - Remove x2t from the CryptPad repo [#1454](https://github.com/cryptpad/cryptpad/issues/1454) - Other OnlyOffice users are shown as "Guest" [#1446](https://github.com/cryptpad/cryptpad/issues/1446) - Document PDF exports are empty when remote embedding is disabled [#1472](https://github.com/cryptpad/cryptpad/issues/1472) + - Sometimes images of a presentation are not exported to PDF [#1500](https://github.com/cryptpad/cryptpad/issues/1500) - Automatic upgrade of an OnlyOffice document fails sometimes [#1534](https://github.com/cryptpad/cryptpad/issues/1534) - Import/Export is broken [#1532](https://github.com/cryptpad/cryptpad/issues/1532) - Print is broken [#1533](https://github.com/cryptpad/cryptpad/issues/1533) @@ -46,7 +186,7 @@ This release introduces a new onboarding flow to guide administrators through th - Switch to new `http2` Nginx option [#1516](https://github.com/cryptpad/cryptpad/pull/1516) - Server fixes and aggregated stats [#1509](https://github.com/cryptpad/cryptpad/pull/1509) - Create the block folder at boot [#911](https://github.com/cryptpad/cryptpad/pull/911) - - Remove obsolete `version` from `docker-compose.yml` [2e716eb](https://github.com/cryptpad/cryptpad/commit/2e716eb4e39fb835f95a1fa1a340e01142d11b1c) + - Remove obsolete `version` from `docker-compose.yml` [2e716eb](https://github.com/cryptpad/cryptpad/commit/2e716eb4e39fb835f95a1fa1a340e01142d11b1c) - Other - Unsharp the corners when hovering the dismiss button on notification drop-down menu [#1466](https://github.com/cryptpad/cryptpad/pull/1466) - Fix contextual menu `Open` on anonymous drive [#1464](https://github.com/cryptpad/cryptpad/pull/1464) diff --git a/Dockerfile b/Dockerfile index e2be11805..c6d343942 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ COPY . /cryptpad RUN sed -i "s@//httpAddress: 'localhost'@httpAddress: '0.0.0.0'@" /cryptpad/config/config.example.js RUN sed -i "s@installMethod: 'unspecified'@installMethod: 'docker'@" /cryptpad/config/config.example.js - + # Install dependencies RUN npm install --production \ && npm run install:components diff --git a/LICENSES/BSD-3-Clause.txt b/LICENSES/BSD-3-Clause.txt index ea890afbc..086d3992c 100644 --- a/LICENSES/BSD-3-Clause.txt +++ b/LICENSES/BSD-3-Clause.txt @@ -1,4 +1,4 @@ -Copyright (c) . +Copyright (c) . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/LICENSES/MPL-2.0.txt b/LICENSES/MPL-2.0.txt index ee6256cdb..d0a1fa148 100644 --- a/LICENSES/MPL-2.0.txt +++ b/LICENSES/MPL-2.0.txt @@ -35,7 +35,7 @@ Mozilla Public License Version 2.0 means any form of the work other than Source Code Form. 1.7. "Larger Work" - means a work that combines Covered Software with other material, in + means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software. 1.8. "License" diff --git a/customize.dist/404.html b/customize.dist/404.html index 8f5d4e419..6515b1c50 100644 --- a/customize.dist/404.html +++ b/customize.dist/404.html @@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later - +