Skip to content

Commit

Permalink
Merge branch '5.4-rc'
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbenque committed Aug 10, 2023
2 parents 5e53b8e + 901baa8 commit a99a704
Show file tree
Hide file tree
Showing 329 changed files with 39,727 additions and 1,554 deletions.
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

9 changes: 9 additions & 0 deletions .dockerignore
@@ -0,0 +1,9 @@
.dockerignore
.git
.gitignore
.gitmodules
.github
docker-compose.yml
traefik2.yml
Dockerfile*
*.png
12 changes: 12 additions & 0 deletions .editorconfig
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
charset = utf-8
2 changes: 1 addition & 1 deletion .flowconfig
@@ -1,5 +1,5 @@
[ignore]
.*/bower_components/.*
.*/components/.*
.*/node_modules/lesshint/*
[include]

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_resolution.yml
Expand Up @@ -85,7 +85,7 @@ body:
label: Version
description: What version of CryptPad are you running?
options:
- 5.4-rc
- 5.4.0
- 5.3.0
- 5.2.1
- 5.2.0
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,5 +1,6 @@
datastore
tasks
www/components/*
www/bower_components/*
www/accounts
node_modules
Expand All @@ -22,4 +23,3 @@ block/
logs/
privileged.conf
config/config.js
*.sh
1 change: 1 addition & 0 deletions .jshintignore
@@ -1,4 +1,5 @@
node_modules/
www/components/
www/bower_components/
www/common/onlyoffice/sdkjs
www/common/onlyoffice/web-apps
Expand Down
72 changes: 72 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,75 @@
# 5.4.0

## Goals

This release introduces two major new features:
- New Diagram application
- 2 factor authentication using time-based one-time passwords (TOTP)

Also included are some improvements, dependency updates, and bug fixes

## Features

- Diagram application: integration of [Draw.io](https://www.drawio.com/) with CryptPad's encrypted real time collaboration [[#1070](https://github.com/cryptpad/cryptpad/pull/1070)]
- Introduce a new app color for Diagram and adjust Whiteboard color [[#1059](https://github.com/cryptpad/cryptpad/issues/1059)]
- New 2 Factor Authentication with TOTP [[#1071](https://github.com/cryptpad/cryptpad/pull/1071)]. To enable for a user account:
1. Settings > Security & Privacy
2. Enter your password
3. Save the recovery code
4. Snap the QR code with a 2FA app of your choice
5. ✅ 2FA is enabled
- Docker deployment is now officially supported [[#1064](https://github.com/cryptpad/cryptpad/pull/1064)]

## Improvements

- New setting to destroy all documents of which you are the sole owner
- Settings re-organization
- Add favicons in ICO format [[#1068](https://github.com/cryptpad/cryptpad/pull/1068) thanks @lemondevxyz]

## Bugs / issues

- Form
- Make Form question text selectable in participant view [[#1046](https://github.com/cryptpad/cryptpad/issues/1046)]
- Add form title to archived notifications [[#1065](https://github.com/cryptpad/cryptpad/pull/1065) thanks to @lemondevxyz]
- Add "make a copy" to office editors [[#1067](https://github.com/cryptpad/cryptpad/pull/1067) thanks to @lemondevxyz]
- Disable the "protect tab" feature in Sheets as it cannot be integrated in CryptPad [[#1053](https://github.com/cryptpad/cryptpad/issues/1053)]

## Dependencies

- Remove Bower to manage client side dependencies [[#989](https://github.com/cryptpad/cryptpad/pull/989) [#1072](https://github.com/cryptpad/cryptpad/pull/1072) thanks to @Pamplemousse] ⚠️ Please read upgrade notes carefully if you administer an instance
- Upgrade Mermaid diagrams to 10.2.4 [[#1118](https://github.com/cryptpad/cryptpad/issues/1118)]
- Upgrade CKeditor to 4.22.1 [[#1119](https://github.com/cryptpad/cryptpad/issues/1119)]


## Upgrade notes

⚠️ Please read upgrade notes carefully as this version introduces breaking changes

If you are upgrading from a version older than `5.3.0` please read the upgrade notes of all versions between yours and `5.4.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 5.4.0
```
3. Major changes to the Nginx config
- Access-Control-Allow-Credentials header
- proxy_pass request for /blob/ and /block/ to the node process
- new port for the websocket
- set CSP headers for draw.io, used by the new diagram app
- see the [full diff](https://github.com/cryptpad/cryptpad/compare/5.4-rc#diff-a97d166145edec9545df5228d500c144bd5ec20db759cf5cc6f90309e963b1ca)
4. Bower removed
- To download all dependencies, use `npm install`
- Then, to copy client-side dependencies, use `npm run install:components`
- `www/bower_components` can be removed
5. If you have previously used the `build` command to enable opengraph preview images
- Please run `npm run build` again after upgrading
6. Restart your server
7. Review your instance's checkup page to ensure that you are passing all tests

# 5.3.0

## Goals
Expand Down
51 changes: 51 additions & 0 deletions Dockerfile
@@ -0,0 +1,51 @@
# Multistage build to reduce image size and increase security
FROM node:lts-slim AS build

# Create folder for CryptPad
RUN mkdir /cryptpad
WORKDIR /cryptpad

# Copy CryptPad source code to the container
COPY . /cryptpad

RUN sed -i "s@//httpAddress: '::'@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

# Create actual CryptPad image
FROM node:lts-slim

# Create user and group for CryptPad so it does not run as root
RUN groupadd cryptpad -g 4001
RUN useradd cryptpad -u 4001 -g 4001 -d /cryptpad

# Copy cryptpad with installed modules
COPY --from=build --chown=cryptpad /cryptpad /cryptpad
USER cryptpad

# Copy docker-entrypoint.sh script
COPY --chown=cryptpad docker-entrypoint.sh /cryptpad/docker-entrypoint.sh

# Set workdir to cryptpad
WORKDIR /cryptpad

# Create directories
RUN mkdir blob block customize data datastore

# Volumes for data persistence
VOLUME /cryptpad/blob
VOLUME /cryptpad/block
VOLUME /cryptpad/customize
VOLUME /cryptpad/data
VOLUME /cryptpad/datastore

ENTRYPOINT ["/bin/bash", "/cryptpad/docker-entrypoint.sh"]

# Ports
EXPOSE 3000 3001

# Run cryptpad on startup
CMD ["npm", "start"]
57 changes: 0 additions & 57 deletions bower.json

This file was deleted.

13 changes: 13 additions & 0 deletions config/config.example.js
Expand Up @@ -92,6 +92,19 @@ module.exports = {
*/
//httpSafePort: 3001,

/* Websockets need to be exposed on a separate port from the rest of
* the platform's HTTP traffic. Port 3003 is used by default.
* You can change this to a different port if it is in use by a
* different service, but under most circumstances you can leave this
* commented and it will work.
*
* In production environments, your reverse proxy (usually NGINX)
* will need to forward websocket traffic (/cryptpad_websocket)
* to this port.
*
*/
// websocketPort: 3003,

/* CryptPad will launch a child process for every core available
* in order to perform CPU-intensive tasks in parallel.
* Some host environments may have a very large number of cores available
Expand Down
2 changes: 1 addition & 1 deletion customize.dist/404.html
Expand Up @@ -6,7 +6,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" type="image/png" href="/customize/favicon/main-favicon.png" id="favicon"/>
<script async data-bootload="/customize/four-oh-four.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<script async data-bootload="/customize/four-oh-four.js" data-main="/common/boot.js?ver=1.0" src="/components/requirejs/require.js?ver=2.3.5"></script>
</head>
<body class="html">
<noscript>
Expand Down
2 changes: 1 addition & 1 deletion customize.dist/500.html
Expand Up @@ -6,7 +6,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" type="image/png" href="/customize/favicon/main-favicon.png" id="favicon"/>
<script async data-bootload="/customize/four-oh-four.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<script async data-bootload="/customize/four-oh-four.js" data-main="/common/boot.js?ver=1.0" src="/components/requirejs/require.js?ver=2.3.5"></script>
</head>
<body class="html">
<noscript>
Expand Down
2 changes: 1 addition & 1 deletion customize.dist/ckeditor-config.js
Expand Up @@ -62,7 +62,7 @@ CKEDITOR.editorConfig = function( config ) {
// every part of ckeditor will get in the browser cache.
var fix = function (x) {
if (x.map) { return x.map(fix); }
return (/\/bower_components\/.*\.css$/.test(x)) ? (x + '?ver=' + CKEDITOR.timestamp) : x;
return (/\/components\/.*\.css$/.test(x)) ? (x + '?ver=' + CKEDITOR.timestamp) : x;
};
CKEDITOR.tools._buildStyleHtml = CKEDITOR.tools.buildStyleHtml;
CKEDITOR.document._appendStyleSheet = CKEDITOR.document.appendStyleSheet;
Expand Down
2 changes: 1 addition & 1 deletion customize.dist/contact.html
Expand Up @@ -8,7 +8,7 @@
<link rel="icon" type="image/png" href="/customize/favicon/main-favicon.png" id="favicon"/>
<script src="/customize/pre-loading.js?ver=1.1"></script>
<link href="/customize/src/pre-loading.css?ver=1.0" rel="stylesheet" type="text/css">
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/components/requirejs/require.js?ver=2.3.5"></script>
</head>
<body class="html">
<noscript></noscript>
Expand Down
2 changes: 1 addition & 1 deletion customize.dist/delta-words.js
@@ -1,5 +1,5 @@
define([
'/bower_components/chainpad/chainpad.dist.js',
'/components/chainpad/chainpad.dist.js',
], function (ChainPad) {
var Diff = ChainPad.Diff;

Expand Down
Binary file added customize.dist/favicon.ico
Binary file not shown.
Binary file added customize.dist/favicon/alt-favicon-code.ico
Binary file not shown.
Binary file added customize.dist/favicon/alt-favicon-diagram.ico
Binary file not shown.
Binary file added customize.dist/favicon/alt-favicon-diagram.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added customize.dist/favicon/alt-favicon-doc.ico
Binary file not shown.
Binary file added customize.dist/favicon/alt-favicon-form.ico
Binary file not shown.
Binary file added customize.dist/favicon/alt-favicon-kanban.ico
Binary file not shown.
Binary file added customize.dist/favicon/alt-favicon-pad.ico
Binary file not shown.
Binary file added customize.dist/favicon/alt-favicon-poll.ico
Binary file not shown.
Binary file not shown.
Binary file added customize.dist/favicon/alt-favicon-sheet.ico
Binary file not shown.
Binary file added customize.dist/favicon/alt-favicon-slide.ico
Binary file not shown.
Binary file not shown.
Binary file modified customize.dist/favicon/alt-favicon-whiteboard.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added customize.dist/favicon/alt-favicon.ico
Binary file not shown.

0 comments on commit a99a704

Please sign in to comment.