Skip to content

Commit 571b37b

Browse files
committed
Merge branch 'develop'
2 parents 5db0c8d + a634bd8 commit 571b37b

File tree

138 files changed

+4652
-3809
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+4652
-3809
lines changed

.github/stale.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ exemptLabels:
1212
- Black hole bug
1313
- Special case Bug
1414
- Upstream bug
15+
- Feature Request
1516
# Label to use when marking an issue as stale
1617
staleLabel: wontfix
1718
# Comment to post when marking an issue as stale. Set to `false` to disable

.github/workflows/backend-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
node: [10, 12, 14, 15]
19+
node: [12, 14, 16]
2020

2121
steps:
2222
- name: Checkout repository
@@ -50,7 +50,7 @@ jobs:
5050
strategy:
5151
fail-fast: false
5252
matrix:
53-
node: [10, 12, 14, 15]
53+
node: [12, 14, 16]
5454

5555
steps:
5656
- name: Checkout repository

.github/workflows/frontend-admin-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
node: [10, 12, 14, 15]
14+
node: [12, 14, 16]
1515

1616
steps:
1717
- name: Generate Sauce Labs strings

.github/workflows/major-version-git-pull-update.yml renamed to .github/workflows/upgrade-from-latest-release.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "In-place git pull from master"
1+
name: "Upgrade from latest release"
22

33
# any branch is useful for testing before a PR is submitted
44
on: [push, pull_request]
@@ -16,10 +16,10 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
node: [10, 12, 14, 15]
19+
node: [12, 14, 16]
2020

2121
steps:
22-
- name: Checkout master repository
22+
- name: Check out latest release
2323
uses: actions/checkout@v2
2424
with:
2525
ref: master
@@ -60,10 +60,18 @@ jobs:
6060
- name: Run the backend tests
6161
run: cd src && npm test
6262

63-
- name: Git fetch
64-
run: git fetch
63+
# Because actions/checkout@v2 is called with "ref: master" and without
64+
# "fetch-depth: 0", the local clone does not have the ${GITHUB_SHA} commit.
65+
# Fetch ${GITHUB_REF} to get the ${GITHUB_SHA} commit. Note that a plain
66+
# "git fetch" only fetches "normal" references (refs/heads/* and
67+
# refs/tags/*), and for pull requests none of the normal references include
68+
# ${GITHUB_SHA}, so we have to explicitly tell Git to fetch ${GITHUB_REF}.
69+
- name: Fetch the new Git commits
70+
run: git fetch --depth=1 origin "${GITHUB_REF}"
6571

66-
- name: Checkout this branch over master
72+
- name: Upgrade to the new Git revision
73+
# For pull requests, ${GITHUB_SHA} is the automatically generated merge
74+
# commit that merges the PR's source branch to its destination branch.
6775
run: git checkout "${GITHUB_SHA}"
6876

6977
- name: Install all dependencies and symlink for ep_etherpad-lite

CHANGELOG.md

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,68 @@
1+
# 1.8.14
2+
3+
### Security fixes
4+
5+
* Fixed a persistent XSS vulnerability in the Chat component. In case you can't
6+
update to 1.8.14 directly, we strongly recommend to cherry-pick
7+
a7968115581e20ef47a533e030f59f830486bdfa. Thanks to sonarsource for the
8+
professional disclosure.
9+
10+
### Compatibility changes
11+
12+
* Node.js v12.13.0 or later is now required.
13+
* The `favicon` setting is now interpreted as a pathname to a favicon file, not
14+
a URL. Please see the documentation comment in `settings.json.template`.
15+
* The undocumented `faviconPad` and `faviconTimeslider` settings have been
16+
removed.
17+
* MySQL/MariaDB now uses connection pooling, which means you will see up to 10
18+
connections to the MySQL/MariaDB server (by default) instead of 1. This might
19+
cause Etherpad to crash with a "ER_CON_COUNT_ERROR: Too many connections"
20+
error if your server is configured with a low connection limit.
21+
* Changes to environment variable substitution in `settings.json` (see the
22+
documentation comments in `settings.json.template` for details):
23+
* An environment variable set to the string "null" now becomes `null` instead
24+
of the string "null". Similarly, if the environment variable is unset and
25+
the default value is "null" (e.g., `"${UNSET_VAR:null}"`), the value now
26+
becomes `null` instead of the string "null". It is no longer possible to
27+
produce the string "null" via environment variable substitution.
28+
* An environment variable set to the string "undefined" now causes the setting
29+
to be removed instead of set to the string "undefined". Similarly, if the
30+
environment variable is unset and the default value is "undefined" (e.g.,
31+
`"${UNSET_VAR:undefined}"`), the setting is now removed instead of set to
32+
the string "undefined". It is no longer possible to produce the string
33+
"undefined" via environment variable substitution.
34+
* Support for unset variables without a default value is now deprecated.
35+
Please change all instances of `"${FOO}"` in your `settings.json` to
36+
`${FOO:null}` to keep the current behavior.
37+
* The `DB_*` variable substitutions in `settings.json.docker` that previously
38+
defaulted to `null` now default to "undefined".
39+
* Calling `next` without argument when using `Changeset.opIterator` does always
40+
return a new Op. See b9753dcc7156d8471a5aa5b6c9b85af47f630aa8 for details.
41+
42+
### Notable enhancements and fixes
43+
44+
* MySQL/MariaDB now uses connection pooling, which should improve stability and
45+
reduce latency.
46+
* Bulk database writes are now retried individually on write failure.
47+
* Minify: Avoid crash due to unhandled Promise rejection if stat fails.
48+
* padIds are now included in /socket.io query string, e.g.
49+
`https://video.etherpad.com/socket.io/?padId=AWESOME&EIO=3&transport=websocket&t=...&sid=...`.
50+
This is useful for directing pads to separate socket.io nodes.
51+
* <script> elements added via aceInitInnerdocbodyHead hook are now executed.
52+
* Fix read only pad access with authentication.
53+
* Await more db writes.
54+
* Disabled wtfnode dump by default.
55+
* Send `USER_NEWINFO` messages on reconnect.
56+
* Fixed loading in a hidden iframe.
57+
* Fixed a race condition with composition. (Thanks @ingoncalves for an exceptionally
58+
detailed analysis and @rhansen for the fix.)
59+
160
# 1.8.13
261

362
### Notable fixes
463

564
* Fixed a bug in the safeRun.sh script (#4935)
6-
* Don't create sessions on some static resources (#4921)
65+
* Add more endpoints that do not need authentication/authorization (#4921)
766
* Fixed issue with non-opening device keyboard on smartphones (#4929)
867
* Add version string to iframe_editor.css to prevent stale cache entry (#4964)
968

Dockerfile

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,38 @@ RUN groupadd --system ${EP_GID:+--gid "${EP_GID}" --non-unique} etherpad && \
5555
ARG EP_DIR=/opt/etherpad-lite
5656
RUN mkdir -p "${EP_DIR}" && chown etherpad:etherpad "${EP_DIR}"
5757

58-
# install abiword for DOC/PDF/ODT export
59-
RUN [ -z "${INSTALL_ABIWORD}" ] || (apt update && apt -y install abiword && apt clean && rm -rf /var/lib/apt/lists/*)
60-
61-
# install libreoffice for DOC/PDF/ODT export
62-
# the mkdir is needed for configuration of openjdk-11-jre-headless, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199
63-
RUN [ -z "${INSTALL_SOFFICE}" ] || (apt update && mkdir -p /usr/share/man/man1 && apt -y install libreoffice && apt clean && rm -rf /var/lib/apt/lists/*)
58+
# the mkdir is needed for configuration of openjdk-11-jre-headless, see
59+
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199
60+
RUN export DEBIAN_FRONTEND=noninteractive; \
61+
mkdir -p /usr/share/man/man1 && \
62+
apt-get -qq update && \
63+
apt-get -qq --no-install-recommends install \
64+
ca-certificates \
65+
git \
66+
${INSTALL_ABIWORD:+abiword} \
67+
${INSTALL_SOFFICE:+libreoffice} \
68+
&& \
69+
apt-get -qq clean && \
70+
rm -rf /var/lib/apt/lists/*
6471

6572
USER etherpad
6673

6774
WORKDIR "${EP_DIR}"
6875

6976
COPY --chown=etherpad:etherpad ./ ./
7077

71-
# install node dependencies for Etherpad
72-
RUN src/bin/installDeps.sh && \
73-
rm -rf ~/.npm/_cacache
74-
75-
RUN [ -z "${ETHERPAD_PLUGINS}" ] || npm install ${ETHERPAD_PLUGINS}
78+
# Plugins must be installed before installing Etherpad's dependencies, otherwise
79+
# npm will try to hoist common dependencies by removing them from
80+
# src/node_modules and installing them in the top-level node_modules. As of
81+
# v6.14.10, npm's hoist logic appears to be buggy, because it sometimes removes
82+
# dependencies from src/node_modules but fails to add them to the top-level
83+
# node_modules. Even if npm correctly hoists the dependencies, the hoisting
84+
# seems to confuse tools such as `npm outdated`, `npm update`, and some ESLint
85+
# rules.
86+
RUN { [ -z "${ETHERPAD_PLUGINS}" ] || \
87+
npm install --no-save ${ETHERPAD_PLUGINS}; } && \
88+
src/bin/installDeps.sh && \
89+
rm -rf ~/.npm
7690

7791
# Copy the configuration file.
7892
COPY --chown=etherpad:etherpad ./settings.json.docker "${EP_DIR}"/settings.json

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Etherpad is extremely flexible providing you the means to modify it to solve wha
3232
# Installation
3333

3434
## Requirements
35-
- `nodejs` >= **10.17.0**.
35+
- [Node.js](https://nodejs.org/) >= **12.13.0**.
3636

3737
## GNU/Linux and other UNIX-like systems
3838

@@ -46,7 +46,8 @@ src/bin/run.sh
4646
```
4747

4848
### Manual install
49-
You'll need git and [node.js](https://nodejs.org) installed (minimum required Node version: **10.17.0**).
49+
50+
You'll need Git and [Node.js](https://nodejs.org/) installed.
5051

5152
**As any user (we recommend creating a separate user called etherpad):**
5253

doc/api/changeset_library.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,9 @@ This is an atext. An atext has two parts: text and attribs. The text is just the
148148

149149
The attribs are again a bunch of operators like .ops in the changeset was. But these operators are only + operators. They describe which part of the text has which attributes
150150

151-
For more information see /doc/easysync/easysync-notes.txt in the source.
151+
## Resources / further reading
152+
153+
Detailed information about the changesets & Easysync protocol:
154+
155+
* Easysync Protocol - [/doc/easysync/easysync-notes.pdf](https://github.com/ether/etherpad-lite/blob/develop/doc/easysync/easysync-notes.pdf)
156+
* Etherpad and EasySync Technical Manual - [/doc/easysync/easysync-full-description.pdf](https://github.com/ether/etherpad-lite/blob/develop/doc/easysync/easysync-full-description.pdf)

doc/api/hooks_client-side.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,11 @@ Things in context:
294294

295295
This hook is called on the client side whenever a chat message is received from
296296
the server. It can be used to create different notifications for chat messages.
297+
Hoook functions can modify the `author`, `authorName`, `duration`, `sticky`,
298+
`text`, and `timeStr` context properties to change how the message is processed.
299+
The `text` and `timeStr` properties may contain HTML, but plugins should be
300+
careful to sanitize any added user input to avoid introducing an XSS
301+
vulnerability.
297302

298303
## collectContentPre
299304

doc/api/hooks_server-side.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,13 @@ Called from: src/node/db/SecurityManager.js
156156

157157
Things in context:
158158

159-
1. padID - the pad the user wants to access
159+
1. padID - the real ID (never the read-only ID) of the pad the user wants to
160+
access
160161
2. token - the token of the author
161162
3. sessionCookie - the session the use has
162163

163-
This hook gets called when the access to the concrete pad is being checked. Return `false` to deny access.
164+
This hook gets called when the access to the concrete pad is being checked.
165+
Return `false` to deny access.
164166

165167
## padCreate
166168
Called from: src/node/db/Pad.js
@@ -615,14 +617,14 @@ is sent to the client. Plugins can use this hook to manipulate the
615617
configuration. (Example: Add a tracking ID for an external analytics tool that
616618
is used client-side.)
617619

618-
The clientVars function must return a Promise that resolves to an object (or
619-
null/undefined) whose properties will be merged into `context.clientVars`.
620-
Returning `callback(value)` will return a Promise that is resolved to `value`.
621-
622-
You can modify `context.clientVars` to change the values sent to the client, but
623-
beware: async functions from other clientVars plugins might also be reading or
624-
manipulating the same `context.clientVars` object. For this reason it is
625-
recommended you return an object rather than modify `context.clientVars`.
620+
You can manipulate `clientVars` in two different ways:
621+
* Return an object. The object will be merged into `clientVars` via
622+
`Object.assign()`, so any keys that already exist in `clientVars` will be
623+
overwritten by the values in the returned object.
624+
* Modify `context.clientVars`. Beware: Other plugins might also be reading or
625+
manipulating the same `context.clientVars` object. To avoid race conditions,
626+
you are encouraged to return an object rather than modify
627+
`context.clientVars`.
626628

627629
If needed, you can access the user's account information (if authenticated) via
628630
`context.socket.client.request.session.user`.
@@ -643,8 +645,6 @@ exports.clientVars = (hookName, context, callback) => {
643645
};
644646
```
645647

646-
This can be accessed on the client-side using `clientVars.currentYear`.
647-
648648
## getLineHTMLForExport
649649
Called from: src/node/utils/ExportHtml.js
650650

0 commit comments

Comments
 (0)