Compare commits

...

2218 Commits

Author SHA1 Message Date
dependabot[bot] 71fdca9f68
build(deps-dev): bump sinon from 17.0.0 to 17.0.1 in /src (#6020)
Bumps [sinon](https://github.com/sinonjs/sinon) from 17.0.0 to 17.0.1.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v17.0.0...v17.0.1)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-01 20:30:55 +01:00
dependabot[bot] 36d5778be6
build(deps-dev): bump selenium-webdriver from 4.14.0 to 4.15.0 in /src (#6019)
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.14.0 to 4.15.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Commits](https://github.com/SeleniumHQ/selenium/compare/selenium-4.14.0...selenium-4.15.0)

---
updated-dependencies:
- dependency-name: selenium-webdriver
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-01 20:30:37 +01:00
dependabot[bot] fddefc0409
build(deps): bump terser from 5.23.0 to 5.24.0 in /src (#6014)
Bumps [terser](https://github.com/terser/terser) from 5.23.0 to 5.24.0.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.23.0...v5.24.0)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-01 20:30:22 +01:00
dependabot[bot] 6286ef3918
build(deps): bump ueberdb2 from 4.2.34 to 4.2.35 in /src (#6013)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.2.34 to 4.2.35.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.2.34...v4.2.35)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-01 20:30:01 +01:00
dependabot[bot] 71b4cda48b
build(deps): bump marked from 9.1.3 to 9.1.4 in /src/bin/doc (#6015)
Bumps [marked](https://github.com/markedjs/marked) from 9.1.3 to 9.1.4.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v9.1.3...v9.1.4)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-01 20:29:51 +01:00
dependabot[bot] b3e5d49a1a
build(deps): bump marked from 9.1.2 to 9.1.3 in /src/bin/doc (#6011)
Bumps [marked](https://github.com/markedjs/marked) from 9.1.2 to 9.1.3.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v9.1.2...v9.1.3)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-30 18:14:26 +01:00
dependabot[bot] c4a7098ef9
build(deps): bump rate-limiter-flexible from 3.0.2 to 3.0.3 in /src (#6009)
Bumps [rate-limiter-flexible](https://github.com/animir/node-rate-limiter-flexible) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/animir/node-rate-limiter-flexible/releases)
- [Commits](https://github.com/animir/node-rate-limiter-flexible/commits)

---
updated-dependencies:
- dependency-name: rate-limiter-flexible
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-30 16:33:17 +01:00
dependabot[bot] 7bec67d3cf
build(deps): bump ueberdb2 from 4.2.32 to 4.2.34 in /src (#6010)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.2.32 to 4.2.34.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.2.32...v4.2.34)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-30 16:32:57 +01:00
dependabot[bot] 7f6c342660
build(deps): bump terser from 5.22.0 to 5.23.0 in /src (#6008)
Bumps [terser](https://github.com/terser/terser) from 5.22.0 to 5.23.0.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.22.0...v5.23.0)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-30 16:32:43 +01:00
translatewiki.net 85c5b46cc6 Localisation updates from https://translatewiki.net. 2023-10-30 13:05:51 +01:00
SamTV12345 c7cb2e663c Fixed documentation of Cli.js 2023-10-29 08:55:54 +01:00
SamTV12345 5bf5d1e720 Merge branch 'master' into develop 2023-10-28 16:34:40 +02:00
SamTV12345 016f43ec4f Merge branch 'develop' 2023-10-28 16:34:39 +02:00
SamTV12345 c95799e712 bump version 2023-10-28 16:34:38 +02:00
SamTV12345 4f550e17de Added changelog. 2023-10-28 16:34:25 +02:00
SamTV12345 a085ea5134 Fixed release script. 2023-10-28 16:30:41 +02:00
dependabot[bot] 7dfac03480
build(deps): bump express-rate-limit from 7.1.2 to 7.1.3 in /src (#6006)
Bumps [express-rate-limit](https://github.com/express-rate-limit/express-rate-limit) from 7.1.2 to 7.1.3.
- [Release notes](https://github.com/express-rate-limit/express-rate-limit/releases)
- [Changelog](https://github.com/express-rate-limit/express-rate-limit/blob/main/changelog.md)
- [Commits](https://github.com/express-rate-limit/express-rate-limit/compare/v7.1.2...v7.1.3)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-27 20:36:19 +02:00
dependabot[bot] 65f5ed8964
build(deps): bump axios from 1.5.1 to 1.6.0 in /src (#6007)
Bumps [axios](https://github.com/axios/axios) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.5.1...v1.6.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-27 20:35:32 +02:00
dependabot[bot] 741a8e6190
build(deps): bump ueberdb2 from 4.2.31 to 4.2.32 in /src (#6004)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.2.31 to 4.2.32.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.2.31...v4.2.32)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-26 21:57:51 +02:00
translatewiki.net bcf0b67677 Localisation updates from https://translatewiki.net. 2023-10-26 13:06:16 +02:00
dependabot[bot] beda2001be
build(deps): bump ueberdb2 from 4.2.30 to 4.2.31 in /src (#5998)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.2.30 to 4.2.31.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.2.30...v4.2.31)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-25 19:09:14 +02:00
dependabot[bot] 0f091113f0
build(deps-dev): bump eslint from 8.51.0 to 8.52.0 in /src (#6000)
Bumps [eslint](https://github.com/eslint/eslint) from 8.51.0 to 8.52.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.51.0...v8.52.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-25 19:09:05 +02:00
dependabot[bot] ea551a9a31
build(deps): bump express-rate-limit from 7.1.1 to 7.1.2 in /src (#5999)
Bumps [express-rate-limit](https://github.com/express-rate-limit/express-rate-limit) from 7.1.1 to 7.1.2.
- [Release notes](https://github.com/express-rate-limit/express-rate-limit/releases)
- [Changelog](https://github.com/express-rate-limit/express-rate-limit/blob/main/changelog.md)
- [Commits](https://github.com/express-rate-limit/express-rate-limit/compare/v7.1.1...v7.1.2)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-25 19:08:31 +02:00
dependabot[bot] 272ca4891e
build(deps): bump actions/setup-node from 3 to 4 (#6002)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-25 19:08:24 +02:00
SamTV12345 f649b1e6f7
Fix/log4js (#5766)
* Updated log4js

* Updated log4js version.

* Removed requests and moved to axios.

* Fixed startup.

* Fixed windows dependency install.

* Fixed import export rate limiter.

* Fixed all log levels.
2023-10-22 18:26:58 +02:00
dependabot[bot] f64ddd9cb1
build(deps): bump rate-limiter-flexible from 3.0.1 to 3.0.2 in /src (#5996)
Bumps [rate-limiter-flexible](https://github.com/animir/node-rate-limiter-flexible) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/animir/node-rate-limiter-flexible/releases)
- [Commits](https://github.com/animir/node-rate-limiter-flexible/commits/v3.0.2)

---
updated-dependencies:
- dependency-name: rate-limiter-flexible
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-21 10:40:32 +02:00
dependabot[bot] 206338a64a
build(deps): bump saucelabs/sauce-connect-action from 2.3.4 to 2.3.5 (#5997)
Bumps [saucelabs/sauce-connect-action](https://github.com/saucelabs/sauce-connect-action) from 2.3.4 to 2.3.5.
- [Release notes](https://github.com/saucelabs/sauce-connect-action/releases)
- [Changelog](https://github.com/saucelabs/sauce-connect-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/saucelabs/sauce-connect-action/compare/v2.3.4...v2.3.5)

---
updated-dependencies:
- dependency-name: saucelabs/sauce-connect-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-21 10:40:23 +02:00
dependabot[bot] 4245b24454
build(deps-dev): bump sinon from 16.1.3 to 17.0.0 in /src (#5995)
Bumps [sinon](https://github.com/sinonjs/sinon) from 16.1.3 to 17.0.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v16.1.3...v17.0.0)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-21 10:40:10 +02:00
najanajana 97a3f27732
normalized 3rd level headings and adapted the max-width of the body (#5994) 2023-10-19 22:12:32 +02:00
SamTV12345 cc22c195d8
Use XHTML syntax for valid Abiword export. (#5986) 2023-10-19 21:34:33 +02:00
najanajana eddaa83912
fixed format of json (#5992)
* fixed format of json

* fixed link for language codes
2023-10-19 21:33:12 +02:00
dependabot[bot] 226dff6600
build(deps-dev): bump sinon from 16.1.0 to 16.1.3 in /src (#5989)
Bumps [sinon](https://github.com/sinonjs/sinon) from 16.1.0 to 16.1.3.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v16.1.0...v16.1.3)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-19 21:26:52 +02:00
dependabot[bot] 57f0c9a79f
build(deps): bump ueberdb2 from 4.2.28 to 4.2.30 in /src (#5991)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.2.28 to 4.2.30.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.2.28...v4.2.30)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-19 21:21:01 +02:00
alaric1995 9e7ab259bc
format (#5993) 2023-10-19 19:52:50 +02:00
dependabot[bot] 7e1ccd3f4e
build(deps): bump ueberdb2 from 4.2.26 to 4.2.28 in /src (#5984)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.2.26 to 4.2.28.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.2.26...v4.2.28)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 20:43:56 +02:00
dependabot[bot] 51e8953697
build(deps): bump marked from 9.1.1 to 9.1.2 in /src/bin/doc (#5982)
Bumps [marked](https://github.com/markedjs/marked) from 9.1.1 to 9.1.2.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v9.1.1...v9.1.2)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 12:50:05 +02:00
SamTV12345 ff1b929eb2
Added jsdoc for the node part of etherpad. (#5983) 2023-10-17 12:49:56 +02:00
dependabot[bot] 53d1e8a160
build(deps): bump rate-limiter-flexible from 3.0.0 to 3.0.1 in /src (#5981)
Bumps [rate-limiter-flexible](https://github.com/animir/node-rate-limiter-flexible) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/animir/node-rate-limiter-flexible/releases)
- [Commits](https://github.com/animir/node-rate-limiter-flexible/commits)

---
updated-dependencies:
- dependency-name: rate-limiter-flexible
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-16 17:39:26 +02:00
dependabot[bot] f56124a722
build(deps): bump terser from 5.21.0 to 5.22.0 in /src (#5980)
Bumps [terser](https://github.com/terser/terser) from 5.21.0 to 5.22.0.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.21.0...v5.22.0)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-16 17:39:17 +02:00
translatewiki.net 90cdea6ca9 Localisation updates from https://translatewiki.net. 2023-10-16 13:07:37 +02:00
SamTV12345 b44af95cb8 Added mysql ueberdb fix. 2023-10-14 00:07:24 +02:00
dependabot[bot] 86b7a71b00
build(deps): bump resolve from 1.22.6 to 1.22.8 in /src (#5976) 2023-10-13 22:49:28 +02:00
dependabot[bot] aa9937b9c2
build(deps): bump ueberdb2 from 4.2.21 to 4.2.22 in /src (#5978)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.2.21 to 4.2.22.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.2.21...v4.2.22)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-13 20:23:42 +02:00
dependabot[bot] dc8434dd8d
build(deps): bump marked from 9.1.0 to 9.1.1 in /src/bin/doc (#5977)
Bumps [marked](https://github.com/markedjs/marked) from 9.1.0 to 9.1.1.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v9.1.0...v9.1.1)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-13 20:15:54 +02:00
translatewiki.net 1085d9c1a2 Localisation updates from https://translatewiki.net. 2023-10-12 13:06:40 +02:00
dependabot[bot] 404771c162
build(deps): bump ueberdb2 from 4.2.20 to 4.2.21 in /src (#5975)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.2.20 to 4.2.21.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.2.20...v4.2.21)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-12 11:20:25 +02:00
dependabot[bot] 824b0828ae
build(deps): bump openapi-backend from 5.10.0 to 5.10.5 in /src (#5972) 2023-10-11 02:45:38 +02:00
dependabot[bot] 86e504984c
build(deps-dev): bump selenium-webdriver from 4.13.0 to 4.14.0 in /src (#5973)
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.13.0 to 4.14.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Commits](https://github.com/SeleniumHQ/selenium/compare/selenium-4.13.0...selenium-4.14.0)

---
updated-dependencies:
- dependency-name: selenium-webdriver
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-10 21:10:53 +02:00
dependabot[bot] 401330b295
build(deps): bump express-rate-limit from 7.1.0 to 7.1.1 in /src (#5970)
Bumps [express-rate-limit](https://github.com/express-rate-limit/express-rate-limit) from 7.1.0 to 7.1.1.
- [Release notes](https://github.com/express-rate-limit/express-rate-limit/releases)
- [Changelog](https://github.com/express-rate-limit/express-rate-limit/blob/main/changelog.md)
- [Commits](https://github.com/express-rate-limit/express-rate-limit/compare/v7.1.0...v7.1.1)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 19:51:45 +02:00
dependabot[bot] 3cde3e8570
build(deps): bump ueberdb2 from 4.2.17 to 4.2.20 in /src (#5971)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.2.17 to 4.2.20.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.2.17...v4.2.20)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 19:51:38 +02:00
dependabot[bot] a21b28a12d
build(deps-dev): bump eslint from 8.50.0 to 8.51.0 in /src (#5969)
Bumps [eslint](https://github.com/eslint/eslint) from 8.50.0 to 8.51.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.50.0...v8.51.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 19:01:47 +02:00
dependabot[bot] ab85331083
build(deps): bump ansi-regex in /src (#5967)
Bumps  and [ansi-regex](https://github.com/chalk/ansi-regex). These dependencies needed to be updated together.

Updates `ansi-regex` from 3.0.0 to 5.0.1
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v5.0.1)

Updates `ansi-regex` from 4.1.0 to 5.0.1
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-07 12:14:55 +02:00
dependabot[bot] eb5970779f
build(deps-dev): bump sinon from 16.0.0 to 16.1.0 in /src (#5966)
Bumps [sinon](https://github.com/sinonjs/sinon) from 16.0.0 to 16.1.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v16.0.0...v16.1.0)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-06 17:57:04 +02:00
dependabot[bot] 5095ff5e1b
build(deps): bump marked from 9.0.3 to 9.1.0 in /src/bin/doc (#5965)
Bumps [marked](https://github.com/markedjs/marked) from 9.0.3 to 9.1.0.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v9.0.3...v9.1.0)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-06 17:56:58 +02:00
dependabot[bot] a89da8569d
build(deps): bump express-rate-limit from 7.0.2 to 7.1.0 in /src (#5964)
Bumps [express-rate-limit](https://github.com/express-rate-limit/express-rate-limit) from 7.0.2 to 7.1.0.
- [Release notes](https://github.com/express-rate-limit/express-rate-limit/releases)
- [Changelog](https://github.com/express-rate-limit/express-rate-limit/blob/main/changelog.md)
- [Commits](https://github.com/express-rate-limit/express-rate-limit/compare/v7.0.2...v7.1.0)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-05 13:30:28 +02:00
dependabot[bot] 7a67cf8aad
build(deps): bump openapi-backend from 5.9.2 to 5.10.0 in /src (#5960)
Bumps [openapi-backend](https://github.com/anttiviljami/openapi-backend) from 5.9.2 to 5.10.0.
- [Commits](https://github.com/anttiviljami/openapi-backend/compare/5.9.2...5.10.0)

---
updated-dependencies:
- dependency-name: openapi-backend
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-04 12:48:03 +02:00
dependabot[bot] df59cceac7
build(deps): bump terser from 5.20.0 to 5.21.0 in /src (#5961)
Bumps [terser](https://github.com/terser/terser) from 5.20.0 to 5.21.0.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.20.0...v5.21.0)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-04 12:47:40 +02:00
SamTV12345 8b5264db41 Updated ueberdb version. 2023-10-02 22:57:51 +02:00
dependabot[bot] 3dedadd3bf
build(deps): bump ueberdb2 from 4.2.13 to 4.2.14 in /src (#5956)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.2.13 to 4.2.14.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.2.13...v4.2.14)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 19:30:30 +02:00
dependabot[bot] b6ce8c7377
build(deps): bump express-rate-limit from 7.0.1 to 7.0.2 in /src (#5952)
Bumps [express-rate-limit](https://github.com/express-rate-limit/express-rate-limit) from 7.0.1 to 7.0.2.
- [Release notes](https://github.com/express-rate-limit/express-rate-limit/releases)
- [Changelog](https://github.com/express-rate-limit/express-rate-limit/blob/main/changelog.md)
- [Commits](https://github.com/express-rate-limit/express-rate-limit/compare/v7.0.1...v7.0.2)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-28 15:47:39 +02:00
dependabot[bot] 22283b513c
build(deps): bump axios from 1.5.0 to 1.5.1 in /src (#5951)
Bumps [axios](https://github.com/axios/axios) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.5.0...v1.5.1)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-27 21:12:42 +02:00
dependabot[bot] 18d3a761c7
build(deps-dev): bump selenium-webdriver from 4.12.0 to 4.13.0 in /src (#5950)
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.12.0 to 4.13.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Commits](https://github.com/SeleniumHQ/selenium/compare/selenium-4.12.0...selenium-4.13.0)

---
updated-dependencies:
- dependency-name: selenium-webdriver
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-27 21:12:34 +02:00
dependabot[bot] 86c5db7a2c
build(deps): bump ueberdb2 from 4.2.12 to 4.2.13 in /src (#5949)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.2.12 to 4.2.13.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.2.12...v4.2.13)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-27 21:12:27 +02:00
dependabot[bot] e823014a04
build(deps): bump ueberdb2 from 4.2.11 to 4.2.12 in /src (#5947) 2023-09-26 07:17:44 +02:00
dependabot[bot] 8d9c6a4582
build(deps-dev): bump eslint from 8.49.0 to 8.50.0 in /src (#5946) 2023-09-26 07:17:33 +02:00
Stefan f9a3a6aaae
Improve update check (#5945)
* Send etherpad version in update check request
* Cache etherpad informations for one hour
* Change format of User-Agent
* Improve exception handling
2023-09-25 13:05:33 +02:00
SamTV12345 f2faa3fa84
Only react to tags starting with v. 2023-09-24 14:06:03 +02:00
SamTV12345 beab8e767f Merge branch 'master' into develop 2023-09-23 14:58:47 +02:00
SamTV12345 293bd64522 Merge branch 'develop' 2023-09-23 14:58:46 +02:00
SamTV12345 75183e737d bump version 2023-09-23 14:58:45 +02:00
SamTV12345 eb7ce6ccf6 Bumped package lock json. 2023-09-23 12:10:30 +02:00
SamTV12345 d13e17c266 Reset version. 2023-09-23 12:10:05 +02:00
SamTV12345 f993bf1073 Merge branch 'master' into develop 2023-09-23 12:04:33 +02:00
SamTV12345 20f8f756f5 bump version 2023-09-23 12:04:32 +02:00
SamTV12345 01ddcde0a9 Merge branch 'develop' 2023-09-23 12:04:32 +02:00
SamTV12345 392e5b10b0 Added changelog for 1.9.3 2023-09-23 11:58:05 +02:00
Denys Halenok 53ef77a24d
Add ability to specify configuration file as a build arg (#5944) 2023-09-23 11:46:14 +02:00
Denys Halenok bc302538c0
Don't access jQuery through `parent.parent` (#5943) 2023-09-22 20:53:24 +02:00
dependabot[bot] 5384edc7c9
build(deps): bump ueberdb2 from 4.2.9 to 4.2.11 in /src (#5941) 2023-09-21 13:25:02 +02:00
dependabot[bot] 3d05616fe7
build(deps): bump terser from 5.19.4 to 5.20.0 in /src (#5942)
Bumps [terser](https://github.com/terser/terser) from 5.19.4 to 5.20.0.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.19.4...v5.20.0)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-20 22:53:45 +02:00
SamTV12345 7acc82af63 Fixed mongodb database connection. 2023-09-20 12:30:26 +02:00
dependabot[bot] e2c4328b44
build(deps): bump marked from 9.0.2 to 9.0.3 in /src/bin/doc (#5940)
Bumps [marked](https://github.com/markedjs/marked) from 9.0.2 to 9.0.3.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v9.0.2...v9.0.3)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-20 10:56:58 +02:00
dependabot[bot] c8a36518d4
build(deps): bump express-rate-limit from 7.0.0 to 7.0.1 in /src (#5937)
Bumps [express-rate-limit](https://github.com/express-rate-limit/express-rate-limit) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/express-rate-limit/express-rate-limit/releases)
- [Changelog](https://github.com/express-rate-limit/express-rate-limit/blob/main/changelog.md)
- [Commits](https://github.com/express-rate-limit/express-rate-limit/compare/v7.0.0...v7.0.1)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 22:55:50 +02:00
dependabot[bot] cd17ba3b83
build(deps): bump resolve from 1.22.5 to 1.22.6 in /src (#5938)
Bumps [resolve](https://github.com/browserify/resolve) from 1.22.5 to 1.22.6.
- [Commits](https://github.com/browserify/resolve/compare/v1.22.5...v1.22.6)

---
updated-dependencies:
- dependency-name: resolve
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 22:55:35 +02:00
dependabot[bot] 35a454efd9
build(deps): bump marked from 9.0.0 to 9.0.2 in /src/bin/doc (#5939)
Bumps [marked](https://github.com/markedjs/marked) from 9.0.0 to 9.0.2.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v9.0.0...v9.0.2)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 22:55:25 +02:00
SamTV12345 9df8a01463 Updated ueberdb 2023-09-16 20:44:33 +02:00
SamTV12345 5bcca29cf9 Bumoed package-lock.json 2023-09-15 23:17:17 +02:00
SamTV12345 cb89c99261 Bumped ueberdb2. 2023-09-15 23:15:46 +02:00
SamTV12345 7759e26ce2
Fix/frontend admin tests (#5935)
* Add missing awaits.

* Remove rate limiter.

* Readded maxHttpBuffersize.

* Revert "Add missing awaits."

This reverts commit d5a8979841.

* Increased timeout.

* Increased timeout further.

* Toggled down timeout.

* Add importExportRateLimit.
2023-09-15 23:08:58 +02:00
SamTV12345 4dfdee941c
Fix/admin test (#5936)
* Add missing awaits.

* Remove rate limiter.

* Readded maxHttpBuffersize.

* Revert "Add missing awaits."

This reverts commit d5a8979841.

* Increased timeout.

* Increased timeout further.

* Toggled down timeout.
2023-09-15 23:06:53 +02:00
SamTV12345 79e1075e88
Fix/admin test (#5934)
* Add missing awaits.

* Remove rate limiter.

* Readded maxHttpBuffersize.

* Revert "Add missing awaits."

This reverts commit d5a8979841.
2023-09-15 22:01:09 +02:00
dependabot[bot] b84ab591aa
build(deps): bump resolve from 1.22.4 to 1.22.5 in /src (#5933)
Bumps [resolve](https://github.com/browserify/resolve) from 1.22.4 to 1.22.5.
- [Commits](https://github.com/browserify/resolve/compare/v1.22.4...v1.22.5)

---
updated-dependencies:
- dependency-name: resolve
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-15 20:35:26 +02:00
dependabot[bot] bcb1a5d48f
build(deps-dev): bump sinon from 15.2.0 to 16.0.0 in /src (#5932)
Bumps [sinon](https://github.com/sinonjs/sinon) from 15.2.0 to 16.0.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v15.2.0...v16.0.0)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-14 18:30:44 +02:00
SamTV12345 239bc2d426
Fixed frontend-admin.yml 2023-09-14 16:47:30 +02:00
SamTV12345 1b01f01ca3
Fix/rate limit in test (#5931)
* build(deps): bump express-rate-limit from 6.11.1 to 7.0.0 in /src

Bumps [express-rate-limit](https://github.com/express-rate-limit/express-rate-limit) from 6.11.1 to 7.0.0.
- [Release notes](https://github.com/express-rate-limit/express-rate-limit/releases)
- [Changelog](https://github.com/express-rate-limit/express-rate-limit/blob/main/changelog.md)
- [Commits](https://github.com/express-rate-limit/express-rate-limit/compare/v6.11.1...v7.0.0)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Increase exportratelimit to high number for tests.

* Fixed rate limiting in frontend tests.

* Also do this for the run without plugins.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-14 16:37:52 +02:00
translatewiki.net 80cd1b6127 Localisation updates from https://translatewiki.net. 2023-09-14 13:06:25 +02:00
dependabot[bot] 3b2ea99efe
build(deps): bump express-rate-limit from 6.11.1 to 7.0.0 in /src (#5930)
* build(deps): bump express-rate-limit from 6.11.1 to 7.0.0 in /src

Bumps [express-rate-limit](https://github.com/express-rate-limit/express-rate-limit) from 6.11.1 to 7.0.0.
- [Release notes](https://github.com/express-rate-limit/express-rate-limit/releases)
- [Changelog](https://github.com/express-rate-limit/express-rate-limit/blob/main/changelog.md)
- [Commits](https://github.com/express-rate-limit/express-rate-limit/compare/v6.11.1...v7.0.0)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Increase exportratelimit to high number for tests.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: SamTV12345 <40429738+samtv12345@users.noreply.github.com>
2023-09-13 20:50:15 +02:00
dependabot[bot] 6711c294ed
build(deps): bump docker/setup-buildx-action from 2 to 3 (#5928)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 20:03:42 +02:00
dependabot[bot] cea68ef99a
build(deps): bump marked from 8.0.1 to 9.0.0 in /src/bin/doc (#5922)
Bumps [marked](https://github.com/markedjs/marked) from 8.0.1 to 9.0.0.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v8.0.1...v9.0.0)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 20:03:25 +02:00
dependabot[bot] ea1cabc4f0
build(deps): bump docker/metadata-action from 4 to 5 (#5924)
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4 to 5.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md)
- [Commits](https://github.com/docker/metadata-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 19:54:17 +02:00
dependabot[bot] c5c861dab4
build(deps): bump docker/build-push-action from 4 to 5 (#5926)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4 to 5.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 19:53:42 +02:00
dependabot[bot] 86f4442e7f
build(deps): bump docker/login-action from 2 to 3 (#5927)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 19:53:29 +02:00
dependabot[bot] 578fb3ea91
build(deps): bump docker/setup-qemu-action from 2 to 3 (#5925)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 19:52:50 +02:00
dependabot[bot] 55096db854
build(deps): bump express-rate-limit from 6.11.0 to 6.11.1 in /src (#5920) 2023-09-11 17:14:20 +02:00
dependabot[bot] 20def68700
build(deps-dev): bump eslint from 8.48.0 to 8.49.0 in /src (#5919) 2023-09-11 17:13:53 +02:00
translatewiki.net eaca37d2b4 Localisation updates from https://translatewiki.net. 2023-09-11 13:04:59 +02:00
dependabot[bot] 331aeacf42
build(deps): bump marked from 8.0.0 to 8.0.1 in /src/bin/doc (#5918) 2023-09-07 17:38:29 +02:00
translatewiki.net d9b36e86cf Localisation updates from https://translatewiki.net. 2023-09-07 13:08:27 +02:00
dependabot[bot] 3179fa87ba
build(deps): bump express-rate-limit from 6.10.0 to 6.11.0 in /src (#5917) 2023-09-07 10:54:52 +02:00
dependabot[bot] 1413d66417
build(deps): bump actions/checkout from 3 to 4 (#5913)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 19:16:08 +02:00
dependabot[bot] 0e5b2575c9
build(deps): bump marked from 7.0.5 to 8.0.0 in /src/bin/doc (#5909)
Bumps [marked](https://github.com/markedjs/marked) from 7.0.5 to 8.0.0.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v7.0.5...v8.0.0)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 15:36:15 +02:00
dependabot[bot] 20b56ba93f
build(deps): bump terser from 5.19.3 to 5.19.4 in /src (#5911)
Bumps [terser](https://github.com/terser/terser) from 5.19.3 to 5.19.4.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.19.3...v5.19.4)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 15:35:11 +02:00
SamTV12345 8fb0ee8c7f Updated release workflow with complete automation. 2023-09-04 21:58:15 +02:00
SamTV12345 6f5d8834e4
Readded building windows with tar/Upload windows build on release
* Use windows.

* Fixed windows yml.

* Also upload windows build on tag to release folder.

* Added comment.

* Updated file name to be in sync with release name.

* Revert "Updated file name to be in sync with release name."

This reverts commit 2fbc26a891.

* Reverted and just rename at the end.
2023-09-04 21:57:10 +02:00
ppom 2632698543
fix abiword not working in container (#5907)
cc @rdelaage
on alpine, plugin command (used in src/node/utils/Abiword.js at line 31)
is not installed by defaut. Add this plugin when installing abiword.

Co-authored-by: ppom <>
2023-09-04 18:55:21 +02:00
dependabot[bot] 66b21e840f
build(deps): bump actions/checkout from 3 to 4 (#5910)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-04 18:51:22 +02:00
dependabot[bot] 6eab99600c
build(deps): bump ueberdb2 from 4.1.21 to 4.1.33 in /src (#5905)
* build(deps): bump ueberdb2 from 4.1.21 to 4.1.33 in /src

Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.1.21 to 4.1.33.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.1.21...v4.1.33)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fixed ueberdb version.

* Added surrealdb.

* Updated ueberdb to 4.2.1

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: SamTV12345 <40429738+samtv12345@users.noreply.github.com>
2023-09-04 18:51:02 +02:00
translatewiki.net 2cbbab42de Localisation updates from https://translatewiki.net. 2023-09-04 13:05:04 +02:00
dependabot[bot] d9ff6158e4
build(deps-dev): bump selenium-webdriver from 4.11.1 to 4.12.0 in /src (#5906)
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.11.1 to 4.12.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Commits](https://github.com/SeleniumHQ/selenium/commits/selenium-4.12.0)

---
updated-dependencies:
- dependency-name: selenium-webdriver
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-01 23:02:40 +02:00
dependabot[bot] 558ced3fde
build(deps): bump rate-limiter-flexible from 2.4.2 to 3.0.0 in /src (#5894)
Bumps [rate-limiter-flexible](https://github.com/animir/node-rate-limiter-flexible) from 2.4.2 to 3.0.0.
- [Release notes](https://github.com/animir/node-rate-limiter-flexible/releases)
- [Commits](https://github.com/animir/node-rate-limiter-flexible/commits/v3.0.0)

---
updated-dependencies:
- dependency-name: rate-limiter-flexible
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-01 21:55:38 +02:00
dependabot[bot] d6c45ab1a5
build(deps): bump express-rate-limit from 6.9.0 to 6.10.0 in /src (#5900)
Bumps [express-rate-limit](https://github.com/express-rate-limit/express-rate-limit) from 6.9.0 to 6.10.0.
- [Release notes](https://github.com/express-rate-limit/express-rate-limit/releases)
- [Changelog](https://github.com/express-rate-limit/express-rate-limit/blob/main/changelog.md)
- [Commits](https://github.com/express-rate-limit/express-rate-limit/compare/v6.9.0...v6.10.0)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-01 00:51:09 +02:00
ppom d13a5f89ec
fix doc link (#5901)
Co-authored-by: ppom <>
2023-09-01 00:50:54 +02:00
dependabot[bot] 33c1a62914
build(deps): bump rehype from 13.0.0 to 13.0.1 in /src (#5898)
Bumps [rehype](https://github.com/rehypejs/rehype) from 13.0.0 to 13.0.1.
- [Release notes](https://github.com/rehypejs/rehype/releases)
- [Changelog](https://github.com/rehypejs/rehype/blob/main/changelog.md)
- [Commits](https://github.com/rehypejs/rehype/compare/13.0.0...13.0.1)

---
updated-dependencies:
- dependency-name: rehype
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-30 22:38:03 +02:00
dependabot[bot] eeed8623f9
build(deps): bump rehype-minify-whitespace from 5.0.1 to 6.0.0 in /src (#5897)
Bumps [rehype-minify-whitespace](https://github.com/rehypejs/rehype-minify) from 5.0.1 to 6.0.0.
- [Release notes](https://github.com/rehypejs/rehype-minify/releases)
- [Changelog](https://github.com/rehypejs/rehype-minify/blob/main/changelog.md)
- [Commits](https://github.com/rehypejs/rehype-minify/compare/rehype-minify-whitespace@5.0.1...6.0.0)

---
updated-dependencies:
- dependency-name: rehype-minify-whitespace
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-30 19:03:37 +02:00
SamTV12345 4835c8e04d
Fixed session key rotation problem with a default empty array on null value. (#5896) 2023-08-29 18:32:39 +02:00
dependabot[bot] 6d38717c16
build(deps): bump terser from 5.19.2 to 5.19.3 in /src (#5895)
Bumps [terser](https://github.com/terser/terser) from 5.19.2 to 5.19.3.
- [Changelog](https://github.com/terser/terser/blob/v5.19.3/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.19.2...v5.19.3)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-29 18:00:33 +02:00
SamTV12345 efdf9dbe36
Fixed session key rotation problem with a default empty array on null value. (#5896) 2023-08-29 18:00:14 +02:00
dependabot[bot] 3f6ba064d8
build(deps): bump axios from 1.4.0 to 1.5.0 in /src (#5891)
Bumps [axios](https://github.com/axios/axios) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.4.0...v1.5.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-28 21:39:06 +02:00
dependabot[bot] a54b1c22c2
build(deps): bump marked from 7.0.4 to 7.0.5 in /src/bin/doc (#5890)
Bumps [marked](https://github.com/markedjs/marked) from 7.0.4 to 7.0.5.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v7.0.4...v7.0.5)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-28 21:39:00 +02:00
dependabot[bot] 2e2747d318
build(deps-dev): bump eslint from 8.47.0 to 8.48.0 in /src (#5892)
Bumps [eslint](https://github.com/eslint/eslint) from 8.47.0 to 8.48.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.47.0...v8.48.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-28 21:38:52 +02:00
dependabot[bot] 9163cafd9f
build(deps): bump rehype from 12.0.1 to 13.0.0 in /src (#5893)
Bumps [rehype](https://github.com/rehypejs/rehype) from 12.0.1 to 13.0.0.
- [Release notes](https://github.com/rehypejs/rehype/releases)
- [Changelog](https://github.com/rehypejs/rehype/blob/main/changelog.md)
- [Commits](https://github.com/rehypejs/rehype/compare/12.0.1...13.0.0)

---
updated-dependencies:
- dependency-name: rehype
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-28 21:38:45 +02:00
translatewiki.net 2a87f9e020 Localisation updates from https://translatewiki.net. 2023-08-28 13:08:20 +02:00
dependabot[bot] 87163ba14f
build(deps): bump ueberdb2 from 4.1.20 to 4.1.21 in /src (#5881)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.1.20 to 4.1.21.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.1.20...v4.1.21)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-25 22:39:12 +02:00
dependabot[bot] 501e92d02d
build(deps): bump formidable from 3.5.0 to 3.5.1 in /src (#5885)
Bumps [formidable](https://github.com/node-formidable/formidable) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/node-formidable/formidable/releases)
- [Changelog](https://github.com/node-formidable/formidable/blob/master/CHANGELOG.md)
- [Commits](https://github.com/node-formidable/formidable/compare/v3.5.0...v3.5.1)

---
updated-dependencies:
- dependency-name: formidable
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-25 22:38:55 +02:00
dependabot[bot] 8fdfa1594a
build(deps-dev): bump eslint-config-etherpad in /src (#5882) 2023-08-22 18:03:12 +02:00
dependabot[bot] 1c6aba1cc6
build(deps): bump marked from 7.0.3 to 7.0.4 in /src/bin/doc (#5880)
Bumps [marked](https://github.com/markedjs/marked) from 7.0.3 to 7.0.4.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v7.0.3...v7.0.4)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-21 19:59:43 +02:00
translatewiki.net 085f6557ff Localisation updates from https://translatewiki.net. 2023-08-21 13:04:49 +02:00
dependabot[bot] 89145ab376
build(deps): bump superagent from 8.1.1 to 8.1.2 in /src (#5876)
Bumps [superagent](https://github.com/ladjs/superagent) from 8.1.1 to 8.1.2.
- [Release notes](https://github.com/ladjs/superagent/releases)
- [Changelog](https://github.com/ladjs/superagent/blob/master/HISTORY.md)
- [Commits](https://github.com/ladjs/superagent/compare/v8.1.1...v8.1.2)

---
updated-dependencies:
- dependency-name: superagent
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-17 16:12:54 +02:00
SamTV12345 faa2ed1b4d Merge branch 'master' into develop 2023-08-17 14:44:59 +02:00
SamTV12345 b1c34b5dac Merge branch 'develop' 2023-08-17 14:44:33 +02:00
SamTV12345 f2e6a66d33 bump version 2023-08-17 14:44:31 +02:00
SamTV12345 f881e2ad0b Updated JQuery section. 2023-08-17 14:41:41 +02:00
SamTV12345 ae7800eada Fixed color wheel. 2023-08-17 14:31:36 +02:00
dependabot[bot] f1ad26dd64
build(deps): bump marked from 7.0.2 to 7.0.3 in /src/bin/doc (#5874)
Bumps [marked](https://github.com/markedjs/marked) from 7.0.2 to 7.0.3.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v7.0.2...v7.0.3)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-16 15:09:12 +02:00
dependabot[bot] e72461961c
build(deps): bump superagent from 8.0.9 to 8.1.1 in /src (#5875)
Bumps [superagent](https://github.com/ladjs/superagent) from 8.0.9 to 8.1.1.
- [Release notes](https://github.com/ladjs/superagent/releases)
- [Changelog](https://github.com/ladjs/superagent/blob/master/HISTORY.md)
- [Commits](https://github.com/ladjs/superagent/compare/v8.0.9...v8.1.1)

---
updated-dependencies:
- dependency-name: superagent
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-16 15:09:02 +02:00
dependabot[bot] 0faf9a4d00
build(deps-dev): bump eslint from 8.46.0 to 8.47.0 in /src (#5872)
Bumps [eslint](https://github.com/eslint/eslint) from 8.46.0 to 8.47.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.46.0...v8.47.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-11 21:53:21 +02:00
dependabot[bot] 77556ce5ef
build(deps): bump ueberdb2 from 4.1.18 to 4.1.20 in /src (#5870)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.1.18 to 4.1.20.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.1.18...v4.1.20)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-10 20:56:36 +02:00
dependabot[bot] a84fc880f9
build(deps): bump marked from 7.0.1 to 7.0.2 in /src/bin/doc (#5871)
Bumps [marked](https://github.com/markedjs/marked) from 7.0.1 to 7.0.2.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v7.0.1...v7.0.2)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-10 20:56:28 +02:00
translatewiki.net 784fa6b7cc Localisation updates from https://translatewiki.net. 2023-08-10 13:10:11 +02:00
dependabot[bot] 361353c699
build(deps): bump marked from 7.0.0 to 7.0.1 in /src/bin/doc (#5867)
Bumps [marked](https://github.com/markedjs/marked) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v7.0.0...v7.0.1)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-09 16:02:03 +02:00
SamTV12345 b56d75b1e9
Use parse instead of parseJSON. (#5869) 2023-08-08 19:12:41 +02:00
SamTV12345 a096f1ae33
Update jQuery to 3.7 and fix admintests (#5868)
* jQuery: Migrate to `.on()`, `.off()`, `.trigger()`

This avoids methods that are deprecated in newer versions of jQuery.

* jQuery: avoid `.removeAttr`, prefer `.prop`

* helper.edit: wait up to 10 seconds for ACCEPT_COMMIT

* Chat: disabled attribute is boolean

* Chat: avoid inline onclick handler to support jQuery 3.4+

* jQuery: update to version 3.6.0

* Update to 3.7

* Removed deprecated event.

* Revert change to focus on padeditor.ace

---------

Co-authored-by: webzwo0i <webzwo0i@c3d2.de>
2023-08-08 18:26:25 +02:00
SamTV12345 2f5b6b80e1
Fix/windows build (#5861)
* Use updated env var.

* Show bin and src bin.

* Use native link.

* Use link.

* Check file link.

* Use existing installation on github runner.

* Use -P.

* Use git checkout for copying the data to temp directory.

* Use rsync to copy data.

* Remove package from src.

* Use simple copy to copy the dependencies.

* Copy src folder only.
2023-08-08 16:22:25 +02:00
avkarenow 89201632ca
Call exports.start() for Phusion Passenger (#5866) 2023-08-08 14:03:50 +02:00
dependabot[bot] a8210e9647
build(deps): bump express-rate-limit from 6.8.1 to 6.9.0 in /src (#5865)
Bumps [express-rate-limit](https://github.com/express-rate-limit/express-rate-limit) from 6.8.1 to 6.9.0.
- [Release notes](https://github.com/express-rate-limit/express-rate-limit/releases)
- [Changelog](https://github.com/express-rate-limit/express-rate-limit/blob/main/changelog.md)
- [Commits](https://github.com/express-rate-limit/express-rate-limit/compare/v6.8.1...v6.9.0)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-07 21:25:41 +02:00
dependabot[bot] 5bbaeabccb
build(deps): bump marked from 6.0.0 to 7.0.0 in /src/bin/doc (#5863)
Bumps [marked](https://github.com/markedjs/marked) from 6.0.0 to 7.0.0.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v6.0.0...v7.0.0)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-07 21:14:01 +02:00
dependabot[bot] 2da2a14eba
build(deps): bump resolve from 1.22.2 to 1.22.4 in /src (#5864)
Bumps [resolve](https://github.com/browserify/resolve) from 1.22.2 to 1.22.4.
- [Commits](https://github.com/browserify/resolve/compare/v1.22.2...v1.22.4)

---
updated-dependencies:
- dependency-name: resolve
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-07 21:13:48 +02:00
translatewiki.net e8962f8256 Localisation updates from https://translatewiki.net. 2023-08-07 13:04:34 +02:00
dependabot[bot] 4da66d19dc
build(deps): bump formidable from 2.1.2 to 3.5.0 in /src (#5796)
* build(deps): bump formidable from 2.1.2 to 3.5.0 in /src

Bumps [formidable](https://github.com/node-formidable/formidable) from 2.1.2 to 3.5.0.
- [Release notes](https://github.com/node-formidable/formidable/releases)
- [Changelog](https://github.com/node-formidable/formidable/blob/master/CHANGELOG.md)
- [Commits](https://github.com/node-formidable/formidable/commits/v3.5.0)

---
updated-dependencies:
- dependency-name: formidable
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* formidable migration

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John McLear <john@mclear.co.uk>
2023-08-05 15:48:23 +02:00
dependabot[bot] 24720abdc8
build(deps-dev): bump eslint-config-etherpad in /src (#5856)
Bumps [eslint-config-etherpad](https://github.com/ether/eslint-config-etherpad) from 3.0.17 to 3.0.21.
- [Commits](https://github.com/ether/eslint-config-etherpad/compare/v3.0.17...v3.0.21)

---
updated-dependencies:
- dependency-name: eslint-config-etherpad
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-05 15:47:25 +02:00
dependabot[bot] ee3c4c541c
build(deps): bump ueberdb2 from 4.1.15 to 4.1.18 in /src (#5859)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.1.15 to 4.1.18.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.1.15...v4.1.18)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-05 15:47:06 +02:00
SamTV12345 bc6b05cea6
Skip instead of fail on dependabot. (#5858) 2023-08-03 22:15:35 +02:00
dependabot[bot] f0ad176de9
build(deps): bump marked from 5.1.2 to 6.0.0 in /src/bin/doc (#5854)
Bumps [marked](https://github.com/markedjs/marked) from 5.1.2 to 6.0.0.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v5.1.2...v6.0.0)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-02 23:32:00 +02:00
dependabot[bot] 1e7207566f
build(deps-dev): bump selenium-webdriver from 4.10.0 to 4.11.1 in /src (#5855)
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.10.0 to 4.11.1.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Commits](https://github.com/SeleniumHQ/selenium/commits)

---
updated-dependencies:
- dependency-name: selenium-webdriver
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-01 22:04:47 +02:00
dependabot[bot] fa8a5dfe5c
build(deps-dev): bump eslint from 8.45.0 to 8.46.0 in /src (#5852)
Bumps [eslint](https://github.com/eslint/eslint) from 8.45.0 to 8.46.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.45.0...v8.46.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-31 22:22:21 +02:00
dependabot[bot] e7a5323911
build(deps): bump ueberdb2 from 4.1.13 to 4.1.15 in /src (#5853)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.1.13 to 4.1.15.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.1.13...v4.1.15)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-31 22:14:15 +02:00
webzwo0i 92f8610085 tests: refactor to use async 2023-07-29 22:35:17 +02:00
webzwo0i cd6da7335b tests: fix for appendRevision test 2023-07-29 22:35:17 +02:00
webzwo0i 4cf1be966d
fix appendRevision (#5805)
* test cov

* Added test for checking if a new pad can be created and deleted.

---------

Co-authored-by: SamTV12345 <40429738+samtv12345@users.noreply.github.com>
2023-07-29 18:38:52 +02:00
dependabot[bot] 2434ae32a1
build(deps): bump marked from 5.1.1 to 5.1.2 in /src/bin/doc (#5847)
Bumps [marked](https://github.com/markedjs/marked) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-29 16:04:29 +02:00
dependabot[bot] f1a5aa0646
build(deps): bump ueberdb2 from 4.1.12 to 4.1.13 in /src (#5846)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.1.12 to 4.1.13.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.1.12...v4.1.13)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-29 16:04:20 +02:00
dependabot[bot] 53741eafc4
build(deps): bump rate-limiter-flexible from 2.4.1 to 2.4.2 in /src (#5849)
Bumps [rate-limiter-flexible](https://github.com/animir/node-rate-limiter-flexible) from 2.4.1 to 2.4.2.
- [Release notes](https://github.com/animir/node-rate-limiter-flexible/releases)
- [Commits](https://github.com/animir/node-rate-limiter-flexible/commits)

---
updated-dependencies:
- dependency-name: rate-limiter-flexible
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-29 16:04:06 +02:00
dependabot[bot] 142eab04f5
build(deps): bump express-rate-limit from 6.8.0 to 6.8.1 in /src (#5848)
Bumps [express-rate-limit](https://github.com/express-rate-limit/express-rate-limit) from 6.8.0 to 6.8.1.
- [Release notes](https://github.com/express-rate-limit/express-rate-limit/releases)
- [Changelog](https://github.com/express-rate-limit/express-rate-limit/blob/main/changelog.md)
- [Commits](https://github.com/express-rate-limit/express-rate-limit/compare/v6.8.0...v6.8.1)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-29 16:03:57 +02:00
dependabot[bot] c7f77286ef
build(deps): bump express-rate-limit from 6.7.1 to 6.8.0 in /src (#5842)
Bumps [express-rate-limit](https://github.com/express-rate-limit/express-rate-limit) from 6.7.1 to 6.8.0.
- [Release notes](https://github.com/express-rate-limit/express-rate-limit/releases)
- [Changelog](https://github.com/express-rate-limit/express-rate-limit/blob/main/changelog.md)
- [Commits](https://github.com/express-rate-limit/express-rate-limit/compare/v6.7.1...v6.8.0)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-23 22:04:02 +02:00
dependabot[bot] 75af84cdde
build(deps): bump terser from 5.19.1 to 5.19.2 in /src (#5841)
Bumps [terser](https://github.com/terser/terser) from 5.19.1 to 5.19.2.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.19.1...v5.19.2)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-23 00:08:38 +02:00
dependabot[bot] 3094623f15
build(deps): bump ueberdb2 from 4.1.11 to 4.1.12 in /src (#5836)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.1.11 to 4.1.12.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.1.11...v4.1.12)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-18 18:48:04 +02:00
dependabot[bot] db7c8fac5f
build(deps-dev): bump eslint-config-etherpad in /src (#5837)
Bumps [eslint-config-etherpad](https://github.com/ether/eslint-config-etherpad) from 3.0.16 to 3.0.17.
- [Commits](https://github.com/ether/eslint-config-etherpad/compare/v3.0.16...v3.0.17)

---
updated-dependencies:
- dependency-name: eslint-config-etherpad
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-18 18:34:44 +02:00
dependabot[bot] 296b76b21e
build(deps): bump terser from 5.19.0 to 5.19.1 in /src (#5832)
Bumps [terser](https://github.com/terser/terser) from 5.19.0 to 5.19.1.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.19.0...v5.19.1)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-18 09:02:18 +02:00
dependabot[bot] 4b5ad182bc
build(deps-dev): bump eslint from 8.44.0 to 8.45.0 in /src (#5833)
Bumps [eslint](https://github.com/eslint/eslint) from 8.44.0 to 8.45.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.44.0...v8.45.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-18 09:02:06 +02:00
SamTV12345 aaef8a8c0d Bumped ueberdb version. 2023-07-16 21:36:42 +02:00
dependabot[bot] c696805fdf
build(deps-dev): bump eslint-config-etherpad in /src (#5831)
Bumps [eslint-config-etherpad](https://github.com/ether/eslint-config-etherpad) from 3.0.15 to 3.0.16.
- [Commits](https://github.com/ether/eslint-config-etherpad/compare/v3.0.15...v3.0.16)

---
updated-dependencies:
- dependency-name: eslint-config-etherpad
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-15 22:20:59 +02:00
dependabot[bot] d1800ab682
build(deps): bump ueberdb2 from 4.1.8 to 4.1.9 in /src (#5830)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.1.8 to 4.1.9.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.1.8...v4.1.9)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-15 22:20:50 +02:00
dependabot[bot] 2c77be5728
build(deps): bump terser from 5.18.2 to 5.19.0 in /src (#5826)
Bumps [terser](https://github.com/terser/terser) from 5.18.2 to 5.19.0.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.18.2...v5.19.0)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-11 20:54:02 +02:00
dependabot[bot] eb074d19dc
build(deps): bump semver from 7.5.3 to 7.5.4 in /src (#5823)
Bumps [semver](https://github.com/npm/node-semver) from 7.5.3 to 7.5.4.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.5.3...v7.5.4)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-10 20:28:59 +02:00
dependabot[bot] 864e69a8e7
build(deps): bump ueberdb2 from 4.1.7 to 4.1.8 in /src (#5824)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.1.7 to 4.1.8.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.1.7...v4.1.8)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-10 20:28:44 +02:00
dependabot[bot] 13330c45f8
build(deps): bump marked from 5.1.0 to 5.1.1 in /src/bin/doc (#5819)
Bumps [marked](https://github.com/markedjs/marked) from 5.1.0 to 5.1.1.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v5.1.0...v5.1.1)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-07 19:18:39 +02:00
dependabot[bot] 6adc95d780
build(deps): bump express-rate-limit from 6.7.0 to 6.7.1 in /src (#5821)
Bumps [express-rate-limit](https://github.com/express-rate-limit/express-rate-limit) from 6.7.0 to 6.7.1.
- [Release notes](https://github.com/express-rate-limit/express-rate-limit/releases)
- [Changelog](https://github.com/express-rate-limit/express-rate-limit/blob/main/changelog.md)
- [Commits](https://github.com/express-rate-limit/express-rate-limit/compare/v6.7.0...v6.7.1)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-07 18:09:39 +02:00
dependabot[bot] 8e415c10ea
build(deps): bump ueberdb2 from 4.1.6 to 4.1.7 in /src (#5820)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.1.6 to 4.1.7.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.1.6...v4.1.7)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-07 18:09:25 +02:00
dependabot[bot] 33ecd1a2e9
build(deps): bump ueberdb2 from 4.1.5 to 4.1.6 in /src (#5815)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.1.5 to 4.1.6.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.1.5...v4.1.6)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-06 21:13:44 +02:00
SamTV12345 0bf471f97e Updated to express session v1.18.2 2023-07-05 22:58:26 +02:00
dependabot[bot] 323bedd90d build(deps): bump ansi-regex in /src
Bumps  and [ansi-regex](https://github.com/chalk/ansi-regex). These dependencies needed to be updated together.

Updates `ansi-regex` from 3.0.0 to 5.0.1
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v5.0.1)

Updates `ansi-regex` from 4.1.0 to 5.0.1
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-04 13:35:45 +01:00
Richard Hansen 2bb431e7e5
express-session: Implement and enable key rotation (#5362) by @rhansen
* SecretRotator: New class to coordinate key rotation

* express-session: Enable key rotation

* Added new entry in docker.adoc

* Move to own package.Removed fallback as Node 16 is now lowest node version.

* Updated package-lock.json

---------

Co-authored-by: SamTV12345 <40429738+samtv12345@users.noreply.github.com>
2023-07-03 22:58:49 +02:00
DanielHabenicht 675c0130b9
allow option to make pad names case-insensitive (#5501) by @DanielHabenicht
* New option to make pad names case-insensitive

fixes #3844

* fix helper.gotoTimeslider()

* fix helper.aNewPad() return value

* Update src/node/utils/Settings.js

Co-authored-by: Richard Hansen <rhansen@rhansen.org>

* remove timeout

* rename enforceLowerCasePadIds to lowerCasePadIds

* use before and after hooks

* update with socket specific test

* enforce sanitizing padID for websocket connections

- only enforce for newly created pads, to combat case-sensitive pad name hijacking

* Added updated package.json file.

---------

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
Co-authored-by: SamTV12345 <40429738+samtv12345@users.noreply.github.com>
2023-07-03 20:52:49 +02:00
dependabot[bot] 22704f7dff
build(deps): bump ueberdb2 from 4.1.4 to 4.1.5 in /src (#5808)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.1.4 to 4.1.5.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.1.4...v4.1.5)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-03 18:07:43 +02:00
SamTV12345 6ee4d3daaa Fixed password with only numbers being rejected. 2023-07-02 17:48:16 +02:00
SamTV12345 8e690aa342
Add bash to the docker image. 2023-07-01 19:43:30 +02:00
SamTV12345 9a679aca56
Optimize/docker container (#5800)
* Bumped ueberdb2 to 4.1.1

* Install only production ready dependencies.

* Added optimized Dockerfile.

* Fixed variable detection.

* Move to own variable for detecting production build.

* Use shell syntax for parameter expansion.

* Use shell as default.
2023-07-01 19:23:17 +02:00
SamTV12345 8ab82d713d Bumped ueberdb2 to 4.1.4 with a variable redis url. 2023-07-01 15:07:59 +02:00
SamTV12345 5798126322 Bumped ueberdb2 to 4.1.1 2023-07-01 11:57:53 +02:00
dependabot[bot] 135491c96b
build(deps-dev): bump eslint-config-etherpad in /src (#5791)
Bumps [eslint-config-etherpad](https://github.com/ether/eslint-config-etherpad) from 3.0.13 to 3.0.15.
- [Commits](https://github.com/ether/eslint-config-etherpad/compare/v3.0.13...v3.0.15)

---
updated-dependencies:
- dependency-name: eslint-config-etherpad
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-28 18:49:24 +02:00
dependabot[bot] 626ac50282
build(deps-dev): bump etherpad-cli-client from 2.0.1 to 2.0.2 in /src (#5792)
Bumps [etherpad-cli-client](https://github.com/johnmclear/etherpad-cli-client) from 2.0.1 to 2.0.2.
- [Changelog](https://github.com/ether/etherpad-cli-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/johnmclear/etherpad-cli-client/compare/v2.0.1...v2.0.2)

---
updated-dependencies:
- dependency-name: etherpad-cli-client
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-28 18:30:57 +02:00
dependabot[bot] 0796f1de36
build(deps): bump ueberdb2 from 4.0.1 to 4.0.11 in /src (#5794)
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 4.0.1 to 4.0.11.
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v4.0.1...v4.0.11)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-28 18:10:11 +02:00
SamTV12345 581b2bef27
Update/socket.io to latest 2.x version (#5784)
* build(deps): bump ansi-regex in /src

Bumps  and [ansi-regex](https://github.com/chalk/ansi-regex). These dependencies needed to be updated together.

Updates `ansi-regex` from 3.0.0 to 5.0.1
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v5.0.1)

Updates `ansi-regex` from 4.1.0 to 5.0.1
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Updates socket.io to latest 2.x version.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 23:29:29 +02:00
dependabot[bot] f6e463c38b
build(deps): bump ansi-regex in /src (#5782)
Bumps  and [ansi-regex](https://github.com/chalk/ansi-regex). These dependencies needed to be updated together.

Updates `ansi-regex` from 3.0.0 to 5.0.1
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v5.0.1)

Updates `ansi-regex` from 4.1.0 to 5.0.1
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 23:03:49 +02:00
SamTV12345 db42f23fcc
Added optimized alpine image for better security and smaller image. (#5780) 2023-06-27 22:17:55 +02:00
dependabot[bot] 7dfeda77bf
build(deps): bump terser from 5.18.1 to 5.18.2 in /src (#5779)
Bumps [terser](https://github.com/terser/terser) from 5.18.1 to 5.18.2.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.18.1...v5.18.2)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 21:21:36 +02:00
SamTV12345 049231e4af
Feature/axios (#5776)
* Move from deprecated request package to axios.

* Fixed package.json

* Another check.

* Fixing npm - hopefully the last.

* Remove double parsing of JSON.

* Bump bundled npm to also get rid of request in the bundled npm.

* Revert "Bump bundled npm to also get rid of request in the bundled npm."

This reverts commit b60fa4f435.
2023-06-27 21:20:53 +02:00
SamTV12345 7748e8d113
Merge remote-tracking branch 'origin/master' into develop 2023-06-26 23:29:47 +02:00
SamTV12345 50c3803326 Bumped version. 2023-06-26 23:20:21 +02:00
SamTV12345 211cf7499c Bumped version. 2023-06-26 23:04:10 +02:00
SamTV12345 3665d636ae Bumped version. 2023-06-26 23:03:35 +02:00
SamTV12345 2dede75a61 Merge branch 'develop' 2023-06-26 21:05:35 +02:00
SamTV12345 b7295fa8af bump version 2023-06-26 21:05:34 +02:00
SamTV12345 cfa9ea68f5 Added changelog. 2023-06-26 20:35:58 +02:00
John McLear 1e98033632
Security: Fix revision parsing (#5772)
A carefully crated URL can cause Etherpad to hang.
2023-06-26 18:17:06 +01:00
John McLear 1d289520eb
Require Node 16 for Etherpad and target Node 20 for testing (#5771) 2023-06-26 18:11:32 +01:00
dependabot[bot] d3afc1b9fb
build(deps): bump semver from 7.5.2 to 7.5.3 in /src (#5770)
Bumps [semver](https://github.com/npm/node-semver) from 7.5.2 to 7.5.3.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.5.2...v7.5.3)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-26 18:58:17 +02:00
John McLear 5a541ce98d deps: mocha 10 2023-06-24 12:55:13 +01:00
John McLear 3074b8749a deps: jsdom 20 2023-06-24 10:47:18 +01:00
dependabot[bot] fa08e90406 build(deps-dev): bump eslint from 8.14.0 to 8.43.0 in /src
Bumps [eslint](https://github.com/eslint/eslint) from 8.14.0 to 8.43.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.14.0...v8.43.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-23 20:36:39 +01:00
dependabot[bot] a443dab70a build(deps): bump underscore from 1.13.3 to 1.13.6 in /src
Bumps [underscore](https://github.com/jashkenas/underscore) from 1.13.3 to 1.13.6.
- [Commits](https://github.com/jashkenas/underscore/compare/1.13.3...1.13.6)

---
updated-dependencies:
- dependency-name: underscore
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-23 20:33:44 +01:00
dependabot[bot] 1d85bff12c build(deps-dev): bump set-cookie-parser from 2.4.8 to 2.6.0 in /src
Bumps [set-cookie-parser](https://github.com/nfriedly/set-cookie-parser) from 2.4.8 to 2.6.0.
- [Commits](https://github.com/nfriedly/set-cookie-parser/compare/v2.4.8...v2.6.0)

---
updated-dependencies:
- dependency-name: set-cookie-parser
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-23 11:16:24 +01:00
John McLear 159434b759
tests: drop windows 7 test coverage & use chrome latest for admin tests instead of safari (#5752) 2023-06-23 10:22:09 +01:00
dependabot[bot] db43147a44 build(deps): bump async from 3.2.3 to 3.2.4 in /src
Bumps [async](https://github.com/caolan/async) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/master/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v3.2.3...v3.2.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-23 09:33:02 +01:00
dependabot[bot] fe60bf9de3 build(deps): bump ejs from 3.1.7 to 3.1.9 in /src
Bumps [ejs](https://github.com/mde/ejs) from 3.1.7 to 3.1.9.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](https://github.com/mde/ejs/compare/v3.1.7...v3.1.9)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-23 09:32:49 +01:00
dependabot[bot] f9dd0d44e5 build(deps-dev): bump sinon from 13.0.2 to 15.2.0 in /src
Bumps [sinon](https://github.com/sinonjs/sinon) from 13.0.2 to 15.2.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v13.0.2...v15.2.0)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-23 09:32:41 +01:00
dependabot[bot] 0d86d749b5 build(deps): bump terser from 5.16.5 to 5.18.1 in /src
Bumps [terser](https://github.com/terser/terser) from 5.16.5 to 5.18.1.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.16.5...v5.18.1)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-23 09:32:32 +01:00
John McLear d6abab6c74 tests: allow ret_nodes to be global for mocha 2023-06-22 11:33:24 +01:00
John McLear df8d05ae9a bump sql for audit fix 2023-06-22 10:32:05 +01:00
John McLear b669530156
bumping ueberdb to v4 (#5736) 2023-06-22 10:01:04 +01:00
John McLear 04826edd3b
github action fix for windows build (#5737)
* github action fix for windows build

* cypress pathing
2023-06-22 01:45:11 +01:00
dependabot[bot] 9708093a4a
build(deps-dev): bump typescript from 4.6.4 to 4.9.5 in /src (#5738)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.6.4 to 4.9.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.6.4...v4.9.5)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-21 22:24:00 +02:00
dependabot[bot] 807e4bb9ac
build(deps): bump semver from 7.3.7 to 7.5.2 in /src (#5739)
Bumps [semver](https://github.com/npm/node-semver) from 7.3.7 to 7.5.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.3.7...v7.5.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-21 22:13:29 +02:00
dependabot[bot] cc865ad7b3
build(deps): bump openapi-backend from 5.3.0 to 5.9.2 in /src (#5740)
Bumps [openapi-backend](https://github.com/anttiviljami/openapi-backend) from 5.3.0 to 5.9.2.
- [Commits](https://github.com/anttiviljami/openapi-backend/compare/5.3.0...5.9.2)

---
updated-dependencies:
- dependency-name: openapi-backend
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-21 22:08:24 +02:00
dependabot[bot] 666b6989f4
build(deps): bump resolve from 1.22.0 to 1.22.2 in /src (#5741)
Bumps [resolve](https://github.com/browserify/resolve) from 1.22.0 to 1.22.2.
- [Commits](https://github.com/browserify/resolve/compare/v1.22.0...v1.22.2)

---
updated-dependencies:
- dependency-name: resolve
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-21 19:15:03 +02:00
dependabot[bot] 6507f1fbd6
build(deps): bump clean-css from 5.3.0 to 5.3.2 in /src (#5742)
Bumps [clean-css](https://github.com/clean-css/clean-css) from 5.3.0 to 5.3.2.
- [Changelog](https://github.com/clean-css/clean-css/blob/master/History.md)
- [Commits](https://github.com/clean-css/clean-css/compare/v5.3.0...v5.3.2)

---
updated-dependencies:
- dependency-name: clean-css
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-21 18:43:41 +02:00
Peter VandeHaar ef918790ca Add keybinding meta-backspace to delete to beginning of line 2023-06-21 13:32:00 +01:00
dependabot[bot] 7ece72503a build(deps): bump actions/dependency-review-action from 1 to 3
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 1 to 3.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](https://github.com/actions/dependency-review-action/compare/v1...v3)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-21 13:17:38 +01:00
dependabot[bot] 81932a3942 build(deps): bump marked from 4.2.12 to 5.1.0 in /src/bin/doc
Bumps [marked](https://github.com/markedjs/marked) from 4.2.12 to 5.1.0.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v4.2.12...v5.1.0)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-21 13:17:13 +01:00
dependabot[bot] 6eb037525c build(deps): bump actions/stale from 7 to 8
Bumps [actions/stale](https://github.com/actions/stale) from 7 to 8.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-21 13:13:52 +01:00
SamTV12345 dc0db68515
Added docs as asciidoctor with cross platform support. (#5733)
* Added docs as asciidoctor with cross platform support.

* Fixed release script with new doc building mechanism.
2023-06-21 13:13:31 +01:00
dependabot[bot] d6c0badfd4 build(deps-dev): bump selenium-webdriver from 4.1.1 to 4.10.0 in /src
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.1.1 to 4.10.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Commits](https://github.com/SeleniumHQ/selenium/commits/selenium-4.10.0)

---
updated-dependencies:
- dependency-name: selenium-webdriver
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-21 13:11:36 +01:00
dependabot[bot] ed8b8f0893 build(deps): bump saucelabs/sauce-connect-action from 2.1.1 to 2.3.4
Bumps [saucelabs/sauce-connect-action](https://github.com/saucelabs/sauce-connect-action) from 2.1.1 to 2.3.4.
- [Release notes](https://github.com/saucelabs/sauce-connect-action/releases)
- [Changelog](https://github.com/saucelabs/sauce-connect-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/saucelabs/sauce-connect-action/compare/v2.1.1...v2.3.4)

---
updated-dependencies:
- dependency-name: saucelabs/sauce-connect-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-21 13:11:20 +01:00
dependabot[bot] 5c376ea17a build(deps): bump joncloud/makensis-action from 3.6 to 3.7
Bumps [joncloud/makensis-action](https://github.com/joncloud/makensis-action) from 3.6 to 3.7.
- [Release notes](https://github.com/joncloud/makensis-action/releases)
- [Commits](https://github.com/joncloud/makensis-action/compare/v3.6...v3.7)

---
updated-dependencies:
- dependency-name: joncloud/makensis-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-21 13:11:06 +01:00
dependabot[bot] ba41ac0772 build(deps-dev): bump supertest from 6.2.4 to 6.3.3 in /src
Bumps [supertest](https://github.com/visionmedia/supertest) from 6.2.4 to 6.3.3.
- [Release notes](https://github.com/visionmedia/supertest/releases)
- [Commits](https://github.com/visionmedia/supertest/compare/v6.2.4...v6.3.3)

---
updated-dependencies:
- dependency-name: supertest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-21 13:10:48 +01:00
dependabot[bot] f519125b4e build(deps): bump js-cookie from 3.0.1 to 3.0.5 in /src
Bumps [js-cookie](https://github.com/js-cookie/js-cookie) from 3.0.1 to 3.0.5.
- [Release notes](https://github.com/js-cookie/js-cookie/releases)
- [Changelog](https://github.com/js-cookie/js-cookie/blob/main/.release-it.json)
- [Commits](https://github.com/js-cookie/js-cookie/compare/v3.0.1...v3.0.5)

---
updated-dependencies:
- dependency-name: js-cookie
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-21 13:10:36 +01:00
dependabot[bot] b739d77812 build(deps): bump express-rate-limit from 6.4.0 to 6.7.0 in /src
Bumps [express-rate-limit](https://github.com/express-rate-limit/express-rate-limit) from 6.4.0 to 6.7.0.
- [Release notes](https://github.com/express-rate-limit/express-rate-limit/releases)
- [Changelog](https://github.com/express-rate-limit/express-rate-limit/blob/main/changelog.md)
- [Commits](https://github.com/express-rate-limit/express-rate-limit/compare/v6.4.0...v6.7.0)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-21 13:10:22 +01:00
John McLear 1c23a40aea docs for public instances 2023-06-20 17:13:01 +01:00
John McLear e365b68d7f Merge branch 'master' into develop 2023-06-20 15:54:15 +01:00
John McLear a562d44d9b Merge branch 'develop' 2023-06-20 15:54:10 +01:00
John McLear 70f6c8b51f bump version 2023-06-20 15:54:08 +01:00
SamTV12345 08c93244ef
Remove package-lock lockfileVersion check. 2023-06-20 16:44:40 +02:00
SamTV12345 843a0dd3c0
Updated package.json 2023-06-20 16:27:41 +02:00
SamTV12345 1d0d109821
Updated changelog 2023-06-20 16:26:02 +02:00
John McLear a17a498caa require node 14 2023-06-20 15:11:41 +01:00
dependabot[bot] 99902d548f build(deps): bump superagent from 7.1.2 to 8.0.9 in /src
Bumps [superagent](https://github.com/ladjs/superagent) from 7.1.2 to 8.0.9.
- [Release notes](https://github.com/ladjs/superagent/releases)
- [Changelog](https://github.com/ladjs/superagent/blob/master/HISTORY.md)
- [Commits](https://github.com/ladjs/superagent/commits/v8.0.9)

---
updated-dependencies:
- dependency-name: superagent
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 15:01:37 +01:00
Debendra Oli 7185693a68 fix: also install libreoffice deps.
Installs java deps when `libreoffice` install is selected.
2023-06-20 14:59:40 +01:00
Chocobozzz f456606015 Prevent infinite loop when exiting 2023-06-20 14:13:24 +01:00
dependabot[bot] 0dea4cb1c8 build(deps): bump docker/setup-buildx-action from 1 to 2
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 2.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 14:11:58 +01:00
dependabot[bot] cfb128ba93 build(deps): bump qs and formidable in /src
Bumps [qs](https://github.com/ljharb/qs) to 6.11.2 and updates ancestor dependency [formidable](https://github.com/node-formidable/formidable). These dependencies need to be updated together.


Updates `qs` from 6.5.2 to 6.11.2
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.11.2)

Updates `formidable` from 2.0.1 to 2.1.2
- [Release notes](https://github.com/node-formidable/formidable/releases)
- [Changelog](https://github.com/node-formidable/formidable/blob/master/CHANGELOG.md)
- [Commits](https://github.com/node-formidable/formidable/commits)

---
updated-dependencies:
- dependency-name: qs
  dependency-type: indirect
- dependency-name: formidable
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 14:11:44 +01:00
dependabot[bot] db8f22fce5 build(deps): bump xml2js and @azure/core-http in /src
Bumps [xml2js](https://github.com/Leonidas-from-XIV/node-xml2js) and [@azure/core-http](https://github.com/Azure/azure-sdk-for-js). These dependencies needed to be updated together.

Updates `xml2js` from 0.4.23 to 0.5.0
- [Commits](https://github.com/Leonidas-from-XIV/node-xml2js/commits/0.5.0)

Updates `@azure/core-http` from 2.2.5 to 2.3.2
- [Release notes](https://github.com/Azure/azure-sdk-for-js/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/Changelog-for-next-generation.md)
- [Commits](https://github.com/Azure/azure-sdk-for-js/compare/@azure/core-http_2.2.5...@azure/core-http_2.3.2)

---
updated-dependencies:
- dependency-name: xml2js
  dependency-type: indirect
- dependency-name: "@azure/core-http"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 14:09:15 +01:00
dependabot[bot] c48e68fa37 build(deps): bump minimatch from 3.0.4 to 3.1.2 in /src
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 14:08:34 +01:00
John McLear 89fe3e79a4 note to get help 2023-06-20 13:58:01 +01:00
John McLear 9e86666b7e Remove LGTM 2023-06-20 13:58:01 +01:00
webzwo0i ed5e8997d7 Fix: Plugin locales should overwrite core's locales 2023-06-20 13:51:01 +01:00
dependabot[bot] 0f557909ba build(deps): bump docker/metadata-action from 3 to 4
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3 to 4.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md)
- [Commits](https://github.com/docker/metadata-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:48:05 +01:00
dependabot[bot] 3879763656 build(deps): bump docker/login-action from 1 to 2
Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 2.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:46:10 +01:00
dependabot[bot] 2f43a0edbe build(deps): bump express from 4.17.3 to 4.18.2 in /src
Bumps [express](https://github.com/expressjs/express) from 4.17.3 to 4.18.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.3...4.18.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:44:37 +01:00
dependabot[bot] c175d1ea36 build(deps): bump actions/stale from 5 to 7
Bumps [actions/stale](https://github.com/actions/stale) from 5 to 7.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v5...v7)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:44:15 +01:00
dependabot[bot] 5ba7ad88b1 build(deps): bump jsonwebtoken and @azure/msal-node in /src
Bumps [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) and [@azure/msal-node](https://github.com/AzureAD/microsoft-authentication-library-for-js). These dependencies needed to be updated together.

Updates `jsonwebtoken` from 8.5.1 to 9.0.0
- [Release notes](https://github.com/auth0/node-jsonwebtoken/releases)
- [Changelog](https://github.com/auth0/node-jsonwebtoken/blob/master/CHANGELOG.md)
- [Commits](https://github.com/auth0/node-jsonwebtoken/compare/v8.5.1...v9.0.0)

Updates `@azure/msal-node` from 1.9.0 to 1.14.6
- [Release notes](https://github.com/AzureAD/microsoft-authentication-library-for-js/releases)
- [Commits](https://github.com/AzureAD/microsoft-authentication-library-for-js/compare/msal-node-v1.9.0...msal-node-v1.14.6)

---
updated-dependencies:
- dependency-name: jsonwebtoken
  dependency-type: indirect
- dependency-name: "@azure/msal-node"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:43:44 +01:00
dependabot[bot] d4b5ce2db3 build(deps): bump docker/build-push-action from 2 to 4
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2 to 4.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2...v4)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:43:20 +01:00
dependabot[bot] 668bf4f772 build(deps): bump socket.io-parser from 3.3.2 to 3.3.3 in /src
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 3.3.2 to 3.3.3.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/3.3.2...3.3.3)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:40:41 +01:00
dependabot[bot] 4e0b2ef92f build(deps): bump json5 from 1.0.1 to 1.0.2 in /src
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:40:09 +01:00
dependabot[bot] 47b9eae648 build(deps): bump simple-git from 3.7.1 to 3.16.0 in /src
Bumps [simple-git](https://github.com/steveukx/git-js/tree/HEAD/simple-git) from 3.7.1 to 3.16.0.
- [Release notes](https://github.com/steveukx/git-js/releases)
- [Changelog](https://github.com/steveukx/git-js/blob/main/simple-git/CHANGELOG.md)
- [Commits](https://github.com/steveukx/git-js/commits/simple-git@3.16.0/simple-git)

---
updated-dependencies:
- dependency-name: simple-git
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:39:33 +01:00
dependabot[bot] bfe3214c61 build(deps): bump marked from 4.0.15 to 4.2.12 in /src/bin/doc
Bumps [marked](https://github.com/markedjs/marked) from 4.0.15 to 4.2.12.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v4.0.15...v4.2.12)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:39:23 +01:00
dependabot[bot] 50dc65f90b build(deps): bump cookiejar from 2.1.3 to 2.1.4 in /src
Bumps [cookiejar](https://github.com/bmeck/node-cookiejar) from 2.1.3 to 2.1.4.
- [Release notes](https://github.com/bmeck/node-cookiejar/releases)
- [Commits](https://github.com/bmeck/node-cookiejar/commits)

---
updated-dependencies:
- dependency-name: cookiejar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:39:02 +01:00
dependabot[bot] 6c02c02501 build(deps): bump jszip from 3.7.1 to 3.10.1 in /src
Bumps [jszip](https://github.com/Stuk/jszip) from 3.7.1 to 3.10.1.
- [Release notes](https://github.com/Stuk/jszip/releases)
- [Changelog](https://github.com/Stuk/jszip/blob/main/CHANGES.md)
- [Commits](https://github.com/Stuk/jszip/compare/v3.7.1...v3.10.1)

---
updated-dependencies:
- dependency-name: jszip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:38:53 +01:00
dependabot[bot] b9c43c3118 build(deps): bump terser from 5.12.1 to 5.16.5 in /src
Bumps [terser](https://github.com/terser/terser) from 5.12.1 to 5.16.5.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.12.1...v5.16.5)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:38:28 +01:00
dependabot[bot] a91a0e2782 build(deps): bump rate-limiter-flexible from 2.3.6 to 2.4.1 in /src
Bumps [rate-limiter-flexible](https://github.com/animir/node-rate-limiter-flexible) from 2.3.6 to 2.4.1.
- [Release notes](https://github.com/animir/node-rate-limiter-flexible/releases)
- [Commits](https://github.com/animir/node-rate-limiter-flexible/commits/v2.4.1)

---
updated-dependencies:
- dependency-name: rate-limiter-flexible
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:37:58 +01:00
Alex efe32ac333
GitHub Workflows security hardening (#5598)
* build: harden frontend-tests.yml permissions
Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden frontend-admin-tests.yml permissions
Signed-off-by: Alex <aleksandrosansan@gmail.com>
2023-06-20 13:27:03 +01:00
translatewiki.net 7656c6b9f1 Localisation updates from https://translatewiki.net. 2023-06-08 13:03:35 +02:00
translatewiki.net 56c68764e6 Localisation updates from https://translatewiki.net. 2023-06-01 13:04:18 +02:00
translatewiki.net e7c8bd5640 Localisation updates from https://translatewiki.net. 2023-05-18 13:03:56 +02:00
translatewiki.net ad4ffb98a7 Localisation updates from https://translatewiki.net. 2023-05-11 13:17:06 +02:00
translatewiki.net a0fcf0493c Localisation updates from https://translatewiki.net. 2023-04-27 13:04:55 +02:00
translatewiki.net facaee5757 Localisation updates from https://translatewiki.net. 2023-04-13 13:05:34 +02:00
translatewiki.net 9920b6a77e Localisation updates from https://translatewiki.net. 2023-04-10 13:04:12 +02:00
translatewiki.net fe5f9bbbf0 Localisation updates from https://translatewiki.net. 2023-03-20 13:05:51 +01:00
translatewiki.net 48381de576 Localisation updates from https://translatewiki.net. 2023-02-27 13:03:23 +01:00
translatewiki.net e75fc263b7 Localisation updates from https://translatewiki.net. 2023-02-23 13:03:55 +01:00
translatewiki.net cc7cdf943a Localisation updates from https://translatewiki.net. 2023-02-16 13:03:55 +01:00
translatewiki.net 2e8811606b Localisation updates from https://translatewiki.net. 2023-02-06 13:04:45 +01:00
translatewiki.net 1243def0d2 Localisation updates from https://translatewiki.net. 2023-01-23 13:03:32 +01:00
translatewiki.net 3150f07a6c Localisation updates from https://translatewiki.net. 2023-01-19 13:04:35 +01:00
translatewiki.net ea17cee5b8 Localisation updates from https://translatewiki.net. 2023-01-16 13:03:23 +01:00
translatewiki.net 33dead6cd0 Localisation updates from https://translatewiki.net. 2023-01-09 13:09:11 +01:00
translatewiki.net 05b22fd815 Localisation updates from https://translatewiki.net. 2023-01-02 13:03:46 +01:00
translatewiki.net e221e9e293 Localisation updates from https://translatewiki.net. 2022-12-26 13:04:47 +01:00
translatewiki.net 77fff89bb7 Localisation updates from https://translatewiki.net. 2022-12-12 13:03:44 +01:00
translatewiki.net d426878dac Localisation updates from https://translatewiki.net. 2022-12-08 13:03:39 +01:00
translatewiki.net 6e9189e4eb Localisation updates from https://translatewiki.net. 2022-12-05 13:03:16 +01:00
translatewiki.net 5c1a5ce2ef Localisation updates from https://translatewiki.net. 2022-11-21 13:03:04 +01:00
translatewiki.net 3a3c0f7c58 Localisation updates from https://translatewiki.net. 2022-11-07 13:09:50 +01:00
translatewiki.net 9b09e4d577 Localisation updates from https://translatewiki.net. 2022-11-03 13:03:44 +01:00
translatewiki.net ff91dee61b Localisation updates from https://translatewiki.net. 2022-10-20 13:04:01 +02:00
translatewiki.net f5a5b5d164 Localisation updates from https://translatewiki.net. 2022-10-13 13:03:26 +02:00
translatewiki.net 6d1dcc4227 Localisation updates from https://translatewiki.net. 2022-10-10 13:03:20 +02:00
translatewiki.net b51ca3a822 Localisation updates from https://translatewiki.net. 2022-10-06 13:04:06 +02:00
translatewiki.net daba272367 Localisation updates from https://translatewiki.net. 2022-10-03 13:03:23 +02:00
translatewiki.net ebe20f9167 Localisation updates from https://translatewiki.net. 2022-09-29 13:03:30 +02:00
translatewiki.net b9a8dba389 Localisation updates from https://translatewiki.net. 2022-09-26 13:03:48 +02:00
dependabot[bot] 156348e314 build(deps): bump docker/setup-qemu-action from 1 to 2
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1 to 2.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-25 00:09:13 +02:00
dependabot[bot] bbb5cea0b5 build(deps-dev): bump supertest from 6.2.2 to 6.2.4 in /src
Bumps [supertest](https://github.com/visionmedia/supertest) from 6.2.2 to 6.2.4.
- [Release notes](https://github.com/visionmedia/supertest/releases)
- [Commits](https://github.com/visionmedia/supertest/compare/v6.2.2...v6.2.4)

---
updated-dependencies:
- dependency-name: supertest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-25 00:01:49 +02:00
dependabot[bot] 6d4abbb221 build(deps): bump minimist from 1.2.5 to 1.2.6 in /src
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/commits)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-24 23:51:58 +02:00
webzwo0i 22a9b81cf0 add changelog entry for node v14 requirement 2022-09-24 22:58:32 +02:00
webzwo0i c28177388a Drop support for Node v12.
Add v18 to test matrix
2022-09-24 22:58:32 +02:00
webzwo0i 86d3eabcd8 tests: flaky language test 2022-09-24 20:29:25 +02:00
webzwo0i 21d03c1924 stale workflow: fix syntax 2022-09-24 20:15:55 +02:00
webzwo0i 111ad5c52e fix cypress config 2022-09-24 18:44:15 +02:00
translatewiki.net 50c8016aed Localisation updates from https://translatewiki.net. 2022-09-22 13:03:44 +02:00
translatewiki.net 94767f008e Localisation updates from https://translatewiki.net. 2022-09-19 13:03:59 +02:00
translatewiki.net eff750e8ef Localisation updates from https://translatewiki.net. 2022-09-12 13:03:44 +02:00
translatewiki.net 7e18f8e8be Localisation updates from https://translatewiki.net. 2022-09-05 13:03:31 +02:00
translatewiki.net 68f3be613f Localisation updates from https://translatewiki.net. 2022-08-29 13:03:51 +02:00
translatewiki.net 75f0c1dbcd Localisation updates from https://translatewiki.net. 2022-08-22 13:03:33 +02:00
translatewiki.net fccbef94ae Localisation updates from https://translatewiki.net. 2022-08-11 13:03:57 +02:00
translatewiki.net bab4c7a1c8 Localisation updates from https://translatewiki.net. 2022-08-08 13:03:25 +02:00
translatewiki.net a54fc89a09 Localisation updates from https://translatewiki.net. 2022-08-04 13:04:02 +02:00
translatewiki.net 064a8b5d8e Localisation updates from https://translatewiki.net. 2022-08-01 13:04:42 +02:00
translatewiki.net a130c6d87e Localisation updates from https://translatewiki.net. 2022-07-28 13:05:21 +02:00
translatewiki.net 2afb4080fc Localisation updates from https://translatewiki.net. 2022-07-25 13:04:29 +02:00
Richard Hansen a059a653ba ci: stale: Don't auto-close issues or PRs
Users can't reopen them, so auto-closing tends to irritate users.
Also, when developer activity drops, stale is less meaningful.
2022-07-16 15:08:32 -04:00
Richard Hansen 3018c33efd ci: stale: Use wontfix for close label, not stale 2022-07-16 15:04:40 -04:00
Richard Hansen a95c7b61ea ci: stale: Switch from app to action
The stale app seems to be unmaintained.
2022-07-16 15:03:42 -04:00
translatewiki.net 6a8b096b05 Localisation updates from https://translatewiki.net. 2022-07-04 13:03:55 +02:00
translatewiki.net 723cc7e414 Localisation updates from https://translatewiki.net. 2022-06-27 13:04:30 +02:00
translatewiki.net 4f0953d907 Localisation updates from https://translatewiki.net. 2022-05-26 13:04:41 +02:00
translatewiki.net 9ad002660f Localisation updates from https://translatewiki.net. 2022-05-16 13:03:32 +02:00
Richard Hansen 7e4931cf25 Windows build: Switch to 64-bit Node.js executable 2022-05-14 18:25:29 -04:00
Richard Hansen 2d56838792 Windows build: Upgrade bundled Node.js to v16 2022-05-14 18:25:29 -04:00
Richard Hansen 00173cf55d Windows build: Consolidate Windows workflows 2022-05-14 18:25:29 -04:00
Richard Hansen b1d48bb333 Windows build: Extract .zip outside repo clone 2022-05-14 17:50:46 -04:00
Richard Hansen d70dcc3415 Windows build: Install to `$PROGRAMFILES` 2022-05-14 17:46:32 -04:00
Richard Hansen 52dd6a26bc Windows build: Rename the `.exe` for consistency 2022-05-14 17:46:32 -04:00
Richard Hansen 8a2ef69873 Windows build: Move NSIS installer script to this repo 2022-05-14 17:46:32 -04:00
Richard Hansen d62cc8d62c Windows build: Don't exclude `var` 2022-05-14 17:46:32 -04:00
Richard Hansen e3da5b5bb3 Windows build: Delete unnecessary `cd` 2022-05-14 17:46:32 -04:00
Richard Hansen 752054899f Windows build: Use `git archive` to copy files 2022-05-14 17:46:27 -04:00
Richard Hansen 188ca8a3b1 Windows build: Remove obsolete file removals 2022-05-14 17:45:36 -04:00
Richard Hansen 1dc3c4bde9 Windows build: Clean up after abnormal exits 2022-05-14 17:45:36 -04:00
Richard Hansen e71f69ec72 Windows build: Rename zip to `etherpad-win.zip` 2022-05-14 17:45:30 -04:00
Richard Hansen 77edcebc99 Windows build: Factor out output zip filename 2022-05-13 18:14:56 -04:00
Richard Hansen 5788c1958d Windows build: Use Git to get Etherpad root dir 2022-05-13 18:14:56 -04:00
Richard Hansen 54019a24c3 Windows build: Factor out command checking 2022-05-13 18:14:56 -04:00
Richard Hansen 05e54b198f Windows build: Improve error handling 2022-05-13 18:14:56 -04:00
Richard Hansen f19f3833f3 Windows build: Exit on simple error 2022-05-13 18:14:56 -04:00
translatewiki.net e54ea583f2 Localisation updates from https://translatewiki.net. 2022-05-09 13:03:29 +02:00
Richard Hansen 2facf3a0c5 ExportEtherpad: New `importEtherpad`, `exportEtherpad` hooks 2022-05-06 02:54:34 -04:00
Richard Hansen 44fd70491d ImportEtherpad: Batch database writes 2022-05-05 20:49:52 -04:00
Richard Hansen c1652fd695 ImportEtherpad: Process records in batches
This enables ueberdb to combine multiple queries into a single message
to the database backend.
2022-05-05 20:49:52 -04:00
Richard Hansen 10117bc988 ImportEtherpad: Use a real ueberdb object for the temp Pad
Now plugin authors have access to the full set of DB operations.
2022-05-05 20:49:52 -04:00
Richard Hansen 6a183db850 ExportEtherpad: Parallelize record reads 2022-05-05 19:33:21 -04:00
Richard Hansen 88c0ab8255 ExportEtherpad: Support custom subkeys 2022-05-05 19:33:21 -04:00
Richard Hansen 4b2e2dd9f2 tests: Add tests for `exportEtherpadAdditionalContent` hook 2022-05-05 19:33:21 -04:00
Richard Hansen 78b44daaa8 ExportEtherpad: Fix `exportEtherpadAdditionalContent` hook docs
When exporting, only records like `comments:padId` are supported, not
records like `comments:padId:foo`.
2022-05-05 19:33:21 -04:00
Richard Hansen 936185e3b6 ExportEtherpad: Use Pad API to collect data 2022-05-05 19:33:21 -04:00
Richard Hansen 4a6e77839e ExportEtherpad: Process pad record separately
to improve readability.
2022-05-05 19:33:21 -04:00
Richard Hansen 56a60a34fb ExportEtherpad: Simplify attribute pool iteration 2022-05-05 19:33:21 -04:00
Richard Hansen 3004bc1583 ExportEtherpad: Invert conditions to improve readability
Also delete unnecessary comments.
2022-05-05 19:33:21 -04:00
Richard Hansen b82ccb76df Merge branch 'master' into develop 2022-05-05 18:53:03 -04:00
Richard Hansen 4b96ff6e02 Release v1.8.18 2022-05-05 18:44:03 -04:00
Richard Hansen 10206d9e25 DB: Clean up database initialization 2022-05-05 05:18:53 -04:00
Richard Hansen f22fb13d89 deps: Bump ueberdb2 to 2.2.4 2022-05-05 05:18:53 -04:00
dependabot[bot] 3030f9a417
build(deps): bump ejs from 3.1.6 to 3.1.7 in /src
Bumps [ejs](https://github.com/mde/ejs) from 3.1.6 to 3.1.7.
- [Release notes](https://github.com/mde/ejs/releases)
- [Changelog](https://github.com/mde/ejs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mde/ejs/compare/v3.1.6...v3.1.7)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-03 01:31:58 +00:00
dependabot[bot] 0adc027e25 build(deps): bump github/codeql-action from 1 to 2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 21:30:46 -04:00
dependabot[bot] 6362a625eb build(deps): bump express-rate-limit from 6.3.0 to 6.4.0 in /src
Bumps [express-rate-limit](https://github.com/nfriedly/express-rate-limit) from 6.3.0 to 6.4.0.
- [Release notes](https://github.com/nfriedly/express-rate-limit/releases)
- [Changelog](https://github.com/nfriedly/express-rate-limit/blob/master/changelog.md)
- [Commits](https://github.com/nfriedly/express-rate-limit/compare/v6.3.0...v6.4.0)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 21:30:22 -04:00
Naveen 77e036e8d3 chore(deps): Included dependency review
> Dependency Review GitHub Action in your repository to enforce dependency reviews on your pull requests.
> The action scans for vulnerable versions of dependencies introduced by package version changes in pull requests,
> and warns you about the associated security vulnerabilities.
> This gives you better visibility of what's changing in a pull request,
> and helps prevent vulnerabilities being added to your repository.

https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
2022-05-02 21:27:57 -04:00
dependabot[bot] ddb1397ebf
build(deps): bump underscore from 1.13.2 to 1.13.3 in /src
Bumps [underscore](https://github.com/jashkenas/underscore) from 1.13.2 to 1.13.3.
- [Release notes](https://github.com/jashkenas/underscore/releases)
- [Commits](https://github.com/jashkenas/underscore/compare/1.13.2...1.13.3)

---
updated-dependencies:
- dependency-name: underscore
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-03 01:25:05 +00:00
Richard Hansen 9b87007278 lint: Bump ESLint dependencies 2022-05-02 21:16:24 -04:00
naveen 2929a3c0bd chore: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
2022-05-02 20:48:01 -04:00
dependabot[bot] 0b5ee334d1
build(deps): bump marked from 4.0.14 to 4.0.15 in /src/bin/doc
Bumps [marked](https://github.com/markedjs/marked) from 4.0.14 to 4.0.15.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v4.0.14...v4.0.15)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 15:36:41 +00:00
translatewiki.net 59037b4117 Localisation updates from https://translatewiki.net. 2022-04-28 13:03:58 +02:00
Richard Hansen 0ddefb6221 Merge branch 'master' into develop 2022-04-23 19:08:22 -04:00
DanielHabenicht 745c78c536 Update CONTRIBUTING.md 2022-04-22 22:39:33 -04:00
translatewiki.net 074482afea Localisation updates from https://translatewiki.net. 2022-04-21 13:03:39 +02:00
dependabot[bot] 64757d1636
build(deps): bump ueberdb2 from 2.0.4 to 2.1.0 in /src
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 2.0.4 to 2.1.0.
- [Release notes](https://github.com/ether/ueberDB/releases)
- [Changelog](https://github.com/ether/ueberDB/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v2.0.4...v2.1.0)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-18 15:29:43 +00:00
Richard Hansen 088bb12797 Pad: Parallelize record fetching when checking consistency 2022-04-16 00:03:07 -04:00
Richard Hansen 096379e6f9 Pad: Limit DB concurrency when copying a pad 2022-04-16 00:03:00 -04:00
Richard Hansen 8442e002f9 Pad: Use the Stream library to improve readability 2022-04-15 23:52:16 -04:00
Richard Hansen 7c6746612c tests: Missing chat messages should cause check failure 2022-04-15 23:52:16 -04:00
Richard Hansen cad2440e6a Pad: Improve check failure message prefixing 2022-04-15 23:52:16 -04:00
Richard Hansen 2dbda3fe7e Pad: Check nullness before checking `Number.isInteger()`
This makes it easier to troubleshoot if the value is null.
2022-04-15 23:52:16 -04:00
Richard Hansen 01ffa070ee Pad: Only check `getKeyRevisionNumber()` at key revisions
Checking every revision is more of a unit test than a consistency
check, and limiting checks to key revisions should improve performance
considerably.
2022-04-15 23:52:16 -04:00
Richard Hansen fa0d77c11d Pad: Factor out key rev atext fetch 2022-04-15 23:52:16 -04:00
Richard Hansen 7ee2141fe6 Pad: Simplify `getInternalRevisionAText` 2022-04-15 23:52:16 -04:00
Richard Hansen ff494563d9 Pad: Call `padCreate`, `padUpdate` hooks asynchronously 2022-04-15 23:52:16 -04:00
Richard Hansen 2ca740c1db Pad: Improve readability of `appendRevision()` 2022-04-15 19:14:59 -04:00
Richard Hansen 0d52f985bd Pad: Reuse `getKeyRevisionNumber` when testing if key rev 2022-04-15 19:14:59 -04:00
Richard Hansen 79e7697c1c Pad: Simplify serialization/deserialization 2022-04-15 19:14:59 -04:00
Richard Hansen addc019810 Pad: Use ES6 class syntax to improve readability 2022-04-15 19:14:59 -04:00
Richard Hansen 38b2ffe899 lint: Avoid snake case 2022-04-15 19:14:59 -04:00
Richard Hansen 06f0318dc4 Stream: New utility library for iterables 2022-04-15 19:14:59 -04:00
dependabot[bot] 8d5e03791b build(deps-dev): bump sinon from 13.0.1 to 13.0.2 in /src
Bumps [sinon](https://github.com/sinonjs/sinon) from 13.0.1 to 13.0.2.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v13.0.1...v13.0.2)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-15 18:41:55 -04:00
dependabot[bot] 34d12022a0 build(deps): bump semver from 7.3.6 to 7.3.7 in /src
Bumps [semver](https://github.com/npm/node-semver) from 7.3.6 to 7.3.7.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.3.6...v7.3.7)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-13 17:36:56 -04:00
dependabot[bot] bfefdb4f20 build(deps): bump marked from 4.0.13 to 4.0.14 in /src/bin/doc
Bumps [marked](https://github.com/markedjs/marked) from 4.0.13 to 4.0.14.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v4.0.13...v4.0.14)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 12:31:06 -04:00
dependabot[bot] e707b6e34d build(deps): bump superagent from 7.1.1 to 7.1.2 in /src
Bumps [superagent](https://github.com/visionmedia/superagent) from 7.1.1 to 7.1.2.
- [Release notes](https://github.com/visionmedia/superagent/releases)
- [Changelog](https://github.com/visionmedia/superagent/blob/master/HISTORY.md)
- [Commits](https://github.com/visionmedia/superagent/commits)

---
updated-dependencies:
- dependency-name: superagent
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-09 17:30:48 -04:00
dependabot[bot] 018840ff9f build(deps-dev): bump typescript from 4.6.2 to 4.6.3 in /src
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.6.2 to 4.6.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.6.2...v4.6.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-09 17:19:03 -04:00
dependabot[bot] df41c7b711 build(deps): bump semver from 7.3.5 to 7.3.6 in /src
Bumps [semver](https://github.com/npm/node-semver) from 7.3.5 to 7.3.6.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.3.5...v7.3.6)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-09 17:17:51 -04:00
Richard Hansen 07146591dd Pad: Run `padLoad` hook asynchronously 2022-04-08 22:04:00 -04:00
Richard Hansen b38d66b30b Pad: Move `padLoad` hook to `Pad.init()` 2022-04-08 22:04:00 -04:00
Richard Hansen f9610452cf Pad: New `padCheck` hook 2022-04-08 21:52:11 -04:00
Richard Hansen a2460a9848 Pad: New `padRemove` hook `pad` context property 2022-04-08 21:52:11 -04:00
Richard Hansen 8fe779b58c Pad: New `padCopy` hook `dstPad` context property 2022-04-08 21:52:11 -04:00
Richard Hansen 9cdb69c159 Pad: Rename `originalPad` context property to `srcPad` 2022-04-08 21:52:11 -04:00
Richard Hansen 59d60480c0 Pad: Expose pad-specific database object
This will make it possible for plugins to add/change/delete custom
pad-specific records.
2022-04-08 21:52:11 -04:00
Richard Hansen ba536e68f1 docs: Refine `padRemove` server-side hook documentation 2022-04-08 21:52:11 -04:00
Richard Hansen 362b33c518 docs: Refine `padCopy` server-side hook documentation 2022-04-08 21:52:10 -04:00
dependabot[bot] 5e99ae772a build(deps): bump actions/upload-artifact from 2 to 3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-08 21:44:53 -04:00
dependabot[bot] d7c44c5725 build(deps): bump actions/download-artifact from 2 to 3
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-08 21:44:21 -04:00
dependabot[bot] df5e4b02fa build(deps): bump marked from 4.0.12 to 4.0.13 in /src/bin/doc
Bumps [marked](https://github.com/markedjs/marked) from 4.0.12 to 4.0.13.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v4.0.12...v4.0.13)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-08 21:43:23 -04:00
Richard Hansen 1d7a41fec2 docs: Expand plugin documentation 2022-04-02 01:11:00 -04:00
Richard Hansen 5b53fda9b0 docs: README formatting tweaks 2022-04-02 01:11:00 -04:00
Richard Hansen 581a5df5ff docs: Use http URL for cloning
and some minor edits
2022-04-02 00:16:30 -04:00
dependabot[bot] 2394bc9d9d build(deps): bump clean-css from 5.2.4 to 5.3.0 in /src
Bumps [clean-css](https://github.com/clean-css/clean-css) from 5.2.4 to 5.3.0.
- [Release notes](https://github.com/clean-css/clean-css/releases)
- [Changelog](https://github.com/clean-css/clean-css/blob/master/History.md)
- [Commits](https://github.com/clean-css/clean-css/compare/v5.2.4...v5.3.0)

---
updated-dependencies:
- dependency-name: clean-css
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-02 00:12:35 -04:00
dependabot[bot] 3468d4db44 build(deps): bump rehype-minify-whitespace from 5.0.0 to 5.0.1 in /src
Bumps [rehype-minify-whitespace](https://github.com/rehypejs/rehype-minify) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/rehypejs/rehype-minify/releases)
- [Changelog](https://github.com/rehypejs/rehype-minify/blob/main/changelog.md)
- [Commits](https://github.com/rehypejs/rehype-minify/compare/5.0.0...rehype-minify-whitespace@5.0.1)

---
updated-dependencies:
- dependency-name: rehype-minify-whitespace
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 22:41:35 -04:00
translatewiki.net 1554cc3299 Localisation updates from https://translatewiki.net. 2022-03-31 13:03:59 +02:00
translatewiki.net 419e460ae2 Localisation updates from https://translatewiki.net. 2022-03-28 13:04:02 +02:00
Richard Hansen ff7a2aa0ea css: Immediately transition visibility when showing popup
For reasons I don't understand, an activated popup was visible during
transition even though the boolean `visibility` property didn't switch
to `visible` until the end of the 0.3s transition. This prevented
input elements from getting focus until the end of the transition. Now
input elements can get focus right away.
2022-03-24 16:35:15 -04:00
Richard Hansen 56d6a1800b css: Refactor popup visibility rulesets
to simplify the rules and improve readability.
2022-03-24 16:34:14 -04:00
Richard Hansen 1ad7e4601f load test: Increase startup timeout 2022-03-22 20:07:55 -04:00
Richard Hansen 1c29dcc62d load test: Don't suppress Etherpad output 2022-03-22 20:07:55 -04:00
Richard Hansen 4c6d547e10 load test: Fix argument processing 2022-03-22 20:07:55 -04:00
Richard Hansen e4ed4a0d42 load test: Exit on error 2022-03-22 20:07:55 -04:00
dependabot[bot] 727a6785c9 build(deps): bump openapi-backend from 5.2.1 to 5.3.0 in /src
Bumps [openapi-backend](https://github.com/anttiviljami/openapi-backend) from 5.2.1 to 5.3.0.
- [Release notes](https://github.com/anttiviljami/openapi-backend/releases)
- [Commits](https://github.com/anttiviljami/openapi-backend/compare/5.2.1...5.3.0)

---
updated-dependencies:
- dependency-name: openapi-backend
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 18:49:55 -04:00
dependabot[bot] b93317ffae build(deps): bump terser from 5.12.0 to 5.12.1 in /src
Bumps [terser](https://github.com/terser/terser) from 5.12.0 to 5.12.1.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.12.0...v5.12.1)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 18:47:55 -04:00
Richard Hansen 4535641ebd lint: Bump ESLint dependencies again, update plugins 2022-03-21 18:40:36 -04:00
Richard Hansen c0db840df1 lint: Bump ESLint dependencies 2022-03-21 17:14:51 -04:00
dependabot[bot] c6f1ab3907 build(deps-dev): bump mocha from 9.2.1 to 9.2.2 in /src
Bumps [mocha](https://github.com/mochajs/mocha) from 9.2.1 to 9.2.2.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.2.1...v9.2.2)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 16:52:21 -04:00
dependabot[bot] 6ad5971476 build(deps): bump mime-types from 2.1.34 to 2.1.35 in /src
Bumps [mime-types](https://github.com/jshttp/mime-types) from 2.1.34 to 2.1.35.
- [Release notes](https://github.com/jshttp/mime-types/releases)
- [Changelog](https://github.com/jshttp/mime-types/blob/master/HISTORY.md)
- [Commits](https://github.com/jshttp/mime-types/compare/2.1.34...2.1.35)

---
updated-dependencies:
- dependency-name: mime-types
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 16:45:21 -04:00
dependabot[bot] c10f812d79 build(deps): bump ueberdb2 from 2.0.2 to 2.0.4 in /src
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 2.0.2 to 2.0.4.
- [Release notes](https://github.com/ether/ueberDB/releases)
- [Changelog](https://github.com/ether/ueberDB/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v2.0.2...v2.0.4)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 15:25:13 -04:00
Tom Kunze 49c7a4ba82 extractPadData: Fix wrong DB get function 2022-03-21 04:57:04 -04:00
Grant Slater a11cf67de7 Docker: use buildx to build amd64 and arm64 images 2022-03-20 22:11:09 -04:00
translatewiki.net 4b4d6caf25 Localisation updates from https://translatewiki.net. 2022-03-17 13:03:59 +01:00
Richard Hansen ae092edf0c AuthorManager: New `getAuthorId` hook 2022-03-16 06:10:28 -04:00
Richard Hansen 6d4085f5f0 SecurityManager: Restrict valid author token values 2022-03-16 06:10:28 -04:00
Richard Hansen b89ae69202 SecurityManager: Don't prefetch values
Prefetching can cause unhandled Promise rejections, and it makes the
code less readable.
2022-03-16 06:10:28 -04:00
Richard Hansen 8053875d45 pad_utils: Factor out author token generation 2022-03-16 06:10:28 -04:00
Richard Hansen 4e1674ceaf deps: Bump etherpad-cli-client 2022-03-16 06:10:28 -04:00
Richard Hansen 7f0bf111fe Docker: Configurable time zone 2022-03-14 17:32:05 -04:00
translatewiki.net 0a993399dc Localisation updates from https://translatewiki.net. 2022-03-14 13:03:44 +01:00
Richard Hansen 5748c76db3 ci: docker: Show Etherpad logs 2022-03-12 00:40:48 -05:00
Richard Hansen 178db7508f ci: docker: Wait for container to be healthy 2022-03-12 00:40:48 -05:00
translatewiki.net 14a58fb9ba Localisation updates from https://translatewiki.net. 2022-03-10 13:03:41 +01:00
dependabot[bot] 979c2cc7de
build(deps): bump terser from 5.11.0 to 5.12.0 in /src
Bumps [terser](https://github.com/terser/terser) from 5.11.0 to 5.12.0.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.11.0...v5.12.0)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-02 15:39:12 +00:00
Richard Hansen d0d3290019 lint: Bump ESLint deps 2022-03-01 18:01:52 -05:00
Richard Hansen a6b969c811 ci: Bump actions/checkout to v3 2022-03-01 17:17:16 -05:00
Richard Hansen b2b6acfe5f Merge branch 'master' into develop 2022-02-27 14:04:18 -05:00
Richard Hansen c85ab49444 ci: Synchronize GitHub workflows with `develop` branch 2022-02-27 13:53:23 -05:00
Richard Hansen cfb68e5725 pad_utils: Rate limit identical `warnDeprecated` calls 2022-02-27 02:55:35 -05:00
Richard Hansen 908175d1ca pad_utils: Custom logger interface for `warnDeprecated` 2022-02-27 02:55:09 -05:00
Richard Hansen 248c114547 chat: Omit undefined `authorId`, `displayName` in JSON obj 2022-02-26 20:37:52 -05:00
Richard Hansen ad45359a9d chat: Silence accidental deprecation warnings
This fixes a bug introduced in commit
363a48b6d5.
2022-02-26 20:34:33 -05:00
Richard Hansen e3e86dc0aa checkPlugin: Bump actions/setup-node to v3 2022-02-26 02:18:40 -05:00
dependabot[bot] 90d1ae87a7 build(deps): bump actions/setup-node from 2 to 3
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2 to 3.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-25 23:51:38 -05:00
dependabot[bot] 105facea69 build(deps): bump superagent from 6.1.0 to 7.1.1 in /src
Bumps [superagent](https://github.com/visionmedia/superagent) from 6.1.0 to 7.1.1.
- [Release notes](https://github.com/visionmedia/superagent/releases)
- [Changelog](https://github.com/visionmedia/superagent/blob/master/HISTORY.md)
- [Commits](https://github.com/visionmedia/superagent/compare/v6.1.0...v7.1.1)

---
updated-dependencies:
- dependency-name: superagent
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-25 23:29:19 -05:00
dependabot[bot] 6102bb2abe build(deps-dev): bump sinon from 12.0.1 to 13.0.1 in /src
Bumps [sinon](https://github.com/sinonjs/sinon) from 12.0.1 to 13.0.1.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v12.0.1...v13.0.1)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-25 23:26:15 -05:00
dependabot[bot] 94be22e78a build(deps): bump openapi-backend from 5.2.0 to 5.2.1 in /src
Bumps [openapi-backend](https://github.com/anttiviljami/openapi-backend) from 5.2.0 to 5.2.1.
- [Release notes](https://github.com/anttiviljami/openapi-backend/releases)
- [Commits](https://github.com/anttiviljami/openapi-backend/compare/5.2.0...5.2.1)

---
updated-dependencies:
- dependency-name: openapi-backend
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-25 23:23:49 -05:00
Richard Hansen d0cbf9754d checkPlugin: Run `npm ci` before `npm publish` 2022-02-24 21:26:33 -05:00
dependabot[bot] b4e0e15beb
build(deps): bump jsdom from 18.1.1 to 19.0.0 in /src
Bumps [jsdom](https://github.com/jsdom/jsdom) from 18.1.1 to 19.0.0.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/master/Changelog.md)
- [Commits](https://github.com/jsdom/jsdom/compare/18.1.1...19.0.0)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-25 02:24:35 +00:00
dependabot[bot] 52eae298cf
build(deps): bump jsonminify from 0.4.1 to 0.4.2 in /src
Bumps [jsonminify](https://github.com/fkei/JSON.minify) from 0.4.1 to 0.4.2.
- [Release notes](https://github.com/fkei/JSON.minify/releases)
- [Commits](https://github.com/fkei/JSON.minify/compare/0.4.1...0.4.2)

---
updated-dependencies:
- dependency-name: jsonminify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-25 01:51:26 +00:00
dependabot[bot] 188d897f7e build(deps): bump terser from 5.10.0 to 5.11.0 in /src
Bumps [terser](https://github.com/terser/terser) from 5.10.0 to 5.11.0.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.10.0...v5.11.0)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-24 20:50:04 -05:00
dependabot[bot] 32bfc6ced8 build(deps): bump express-rate-limit from 5.5.1 to 6.3.0 in /src
Bumps [express-rate-limit](https://github.com/nfriedly/express-rate-limit) from 5.5.1 to 6.3.0.
- [Release notes](https://github.com/nfriedly/express-rate-limit/releases)
- [Changelog](https://github.com/nfriedly/express-rate-limit/blob/master/changelog.md)
- [Commits](https://github.com/nfriedly/express-rate-limit/compare/v5.5.1...v6.3.0)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-24 20:49:30 -05:00
Robert Geislinger 58ec6a5c88 Update http_api.md
More information for public Staus HTTP API Calls
2022-02-24 19:45:36 -05:00
Robert Geislinger 4c53f76c25 Update http_api.md
The return Values of createGroupPad for success and error are not correct
2022-02-24 19:45:36 -05:00
dependabot[bot] e87e4231b4 build(deps): bump rehype from 12.0.0 to 12.0.1 in /src
Bumps [rehype](https://github.com/rehypejs/rehype) from 12.0.0 to 12.0.1.
- [Release notes](https://github.com/rehypejs/rehype/releases)
- [Changelog](https://github.com/rehypejs/rehype/blob/main/changelog.md)
- [Commits](https://github.com/rehypejs/rehype/compare/12.0.0...12.0.1)

---
updated-dependencies:
- dependency-name: rehype
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-24 19:31:56 -05:00
dependabot[bot] dda2ac91f7 build(deps): bump express from 4.17.1 to 4.17.3 in /src
Bumps [express](https://github.com/expressjs/express) from 4.17.1 to 4.17.3.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.1...4.17.3)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-24 19:31:21 -05:00
Richard Hansen b733ed9ab0 Pad: Convert line endings in text from `padDefaultContent` hook 2022-02-24 17:40:04 -05:00
Richard Hansen cd43625be8 tests: Add some tests for `src/node/db/Pad.js` 2022-02-24 17:40:04 -05:00
Richard Hansen 2d53b9f150 PadMessageHandler: Plumb author ID to more pad creation locations 2022-02-24 17:40:04 -05:00
Richard Hansen 363a48b6d5 ChatMessage: Log deprecation warnings for `.userId`, `.authorId` 2022-02-24 17:39:38 -05:00
Richard Hansen b4d9252bfe PadMessageHandler: Don't get Pad object multiple times 2022-02-24 17:39:38 -05:00
Richard Hansen b276eb0a23 PadMessageHandler: Improve message sanity checking
Use exceptions instead of silent drops so that the client can detect
the error and react appropriately.
2022-02-24 17:39:38 -05:00
Richard Hansen 3b76b2dd67 SocketIORouter: Improve error handling 2022-02-24 17:39:38 -05:00
Richard Hansen fcfa51bda6 PadMessageHandler: Convert complex `if` to `switch` 2022-02-24 17:39:38 -05:00
translatewiki.net 05dd9920c5 Localisation updates from https://translatewiki.net. 2022-02-24 13:03:13 +01:00
Richard Hansen 32c82917e3 Merge branch 'master' into develop 2022-02-23 17:25:38 -05:00
Richard Hansen d97537d18b Release v1.8.17 2022-02-23 17:03:34 -05:00
Richard Hansen ba370b0e05 PadMessageHandler: Don't trust user-provided `padId` 2022-02-23 16:11:21 -05:00
Richard Hansen bdbde88fed PadMessageHandler: Fix `USER_CHANGES` queue identifier
`message.padId` is normally undefined for `USER_CHANGES` messages.
2022-02-23 16:11:16 -05:00
Richard Hansen c59cbb537a Bump version 2022-02-23 16:10:47 -05:00
Richard Hansen 1513932ca1 plugins: Give each plugin a plugin-specific logger object
This makes it possible for plugins to stop assuming that log4js is
available at `ep_etherpad-lite/node_modules/log4js`.
2022-02-21 15:13:57 -05:00
Richard Hansen daee90d2af lint: Close function args on same line as final arg 2022-02-21 14:53:48 -05:00
Richard Hansen 37508403d8 lint: Replace `Object.assign()` with object spread syntax 2022-02-21 14:36:58 -05:00
Richard Hansen c8211f2898 lint: Run `eslint --fix` 2022-02-21 14:36:58 -05:00
Richard Hansen 8eb310854d lint: Bump ESLint dependencies 2022-02-21 14:36:58 -05:00
Richard Hansen 005ca0bb09 lint: Move ESLint config to `.eslintrc.cjs` 2022-02-21 14:36:58 -05:00
Richard Hansen d2f4931a35 checkPlugin: Use log4js for logging 2022-02-21 14:36:58 -05:00
Richard Hansen 8aec73b129 checkPlugin: Add ability to remove dependencies 2022-02-21 14:36:58 -05:00
Richard Hansen d5db979c93 checkPlugin: Config ESLint via `.eslintrc.cjs` 2022-02-21 14:36:58 -05:00
Richard Hansen f046f0ab81 checkPlugin: Only create `ep_etherpad-lite` symlink if missing
This avoids problems if the plugin has a non-peer dependency on
`ep_etherpad-lite`.
2022-02-20 18:06:46 -05:00
Richard Hansen 9ed1e43593 checkPlugin: Resolve plugin directory symlinks
This works around weird npm bugs.
2022-02-20 18:06:46 -05:00
Richard Hansen d9044537bb checkPlugin: cd to Etherpad root dir 2022-02-20 18:06:46 -05:00
Richard Hansen 5a66abae8b checkPlugin: Move everything inside async IIFE 2022-02-20 18:06:46 -05:00
Richard Hansen 2e0e872ae3 Pad: New `padDefaultContent` hook 2022-02-19 14:55:43 -05:00
Richard Hansen aa286b7dbd API: Add optional `authorId` param to mutation functions 2022-02-19 14:55:42 -05:00
Richard Hansen 50fafe608b tests: Basic test for `restoreRevision` API 2022-02-19 14:55:42 -05:00
Richard Hansen 3b8549342a Pad: Plumb author ID through mutation operations 2022-02-19 14:55:42 -05:00
Richard Hansen 5f60b3aab2 Pad: Remove unneccessary `padManager.getPad()` call 2022-02-19 14:55:42 -05:00
Richard Hansen 449b972e6a Pad: Use default parameter value 2022-02-19 14:55:42 -05:00
Richard Hansen aec512d1fa Pad: Rename `author` context properties to `authorId` 2022-02-19 14:55:42 -05:00
Richard Hansen 65bd5ffa6b Pad: Rename `author` vars to `authorId` for consistency 2022-02-19 14:55:42 -05:00
Richard Hansen c2910b98e8 ImportHandler: Skip default pad text when importing to a new pad 2022-02-19 14:25:51 -05:00
Richard Hansen c8f2409de0 ImportHandler: Drop unnecessary underscores in variable names
Also delete an unnecessary comment.
2022-02-19 14:25:51 -05:00
Richard Hansen 2512593d4b docs: Group HTTP API changes 2022-02-19 14:25:51 -05:00
Richard Hansen a8c061154e docs: Clean up `padCreate`, `padUpdate` hook docs 2022-02-19 14:25:39 -05:00
translatewiki.net a27b400073 Localisation updates from https://translatewiki.net. 2022-02-14 13:03:22 +01:00
dependabot[bot] 4ed436dbbe
build(deps): bump simple-get from 3.1.0 to 3.1.1 in /src
Bumps [simple-get](https://github.com/feross/simple-get) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/feross/simple-get/releases)
- [Commits](https://github.com/feross/simple-get/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: simple-get
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-03 16:29:27 +00:00
dependabot[bot] cdc08d157b build(deps-dev): bump selenium-webdriver from 4.0.0 to 4.1.1 in /src
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.0.0 to 4.1.1.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Commits](https://github.com/SeleniumHQ/selenium/commits)

---
updated-dependencies:
- dependency-name: selenium-webdriver
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-03 11:28:40 -05:00
translatewiki.net b9b6cef4d2 Localisation updates from https://translatewiki.net. 2022-02-03 13:03:23 +01:00
Richard Hansen 33fb4c71e4 deps: Bump ESLint dependencies 2022-02-02 20:21:34 -05:00
translatewiki.net 5d3c34aecb Localisation updates from https://translatewiki.net. 2022-01-31 13:02:59 +01:00
Richard Hansen 5520161088 deps: Upgrade formidable to 2.0.1 2022-01-28 21:34:57 -05:00
dependabot[bot] 6009fdf979
build(deps): bump resolve from 1.20.0 to 1.22.0 in /src
Bumps [resolve](https://github.com/browserify/resolve) from 1.20.0 to 1.22.0.
- [Release notes](https://github.com/browserify/resolve/releases)
- [Commits](https://github.com/browserify/resolve/compare/v1.20.0...v1.22.0)

---
updated-dependencies:
- dependency-name: resolve
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-28 21:47:20 +00:00
dependabot[bot] 0e6fd567f7
build(deps): bump openapi-backend from 5.0.1 to 5.1.1 in /src
Bumps [openapi-backend](https://github.com/anttiviljami/openapi-backend) from 5.0.1 to 5.1.1.
- [Release notes](https://github.com/anttiviljami/openapi-backend/releases)
- [Commits](https://github.com/anttiviljami/openapi-backend/compare/5.0.1...5.1.1)

---
updated-dependencies:
- dependency-name: openapi-backend
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-28 20:49:14 +00:00
dependabot[bot] 0189af9bb1
build(deps): bump clean-css from 5.2.3 to 5.2.4 in /src
Bumps [clean-css](https://github.com/clean-css/clean-css) from 5.2.3 to 5.2.4.
- [Release notes](https://github.com/clean-css/clean-css/releases)
- [Changelog](https://github.com/clean-css/clean-css/blob/master/History.md)
- [Commits](https://github.com/clean-css/clean-css/compare/v5.2.3...v5.2.4)

---
updated-dependencies:
- dependency-name: clean-css
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-28 20:46:01 +00:00
dependabot[bot] 65de9eb733
build(deps): bump underscore from 1.13.1 to 1.13.2 in /src
Bumps [underscore](https://github.com/jashkenas/underscore) from 1.13.1 to 1.13.2.
- [Release notes](https://github.com/jashkenas/underscore/releases)
- [Commits](https://github.com/jashkenas/underscore/compare/1.13.1...1.13.2)

---
updated-dependencies:
- dependency-name: underscore
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-28 20:42:50 +00:00
dependabot[bot] d86e1e5249
build(deps): bump ueberdb2 from 2.0.1 to 2.0.2 in /src
Bumps [ueberdb2](https://github.com/ether/ueberDB) from 2.0.1 to 2.0.2.
- [Release notes](https://github.com/ether/ueberDB/releases)
- [Changelog](https://github.com/ether/ueberDB/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ether/ueberDB/compare/v2.0.1...v2.0.2)

---
updated-dependencies:
- dependency-name: ueberdb2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-28 08:39:13 +00:00
Richard Hansen c40544eade lint: Bump ESLint dependencies 2022-01-28 03:24:14 -05:00
dependabot[bot] 8791082077
build(deps): bump clean-css from 5.2.2 to 5.2.3 in /src
Bumps [clean-css](https://github.com/clean-css/clean-css) from 5.2.2 to 5.2.3.
- [Release notes](https://github.com/clean-css/clean-css/releases)
- [Changelog](https://github.com/clean-css/clean-css/blob/master/History.md)
- [Commits](https://github.com/clean-css/clean-css/compare/v5.2.2...v5.2.3)

---
updated-dependencies:
- dependency-name: clean-css
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-28 07:02:27 +00:00
Richard Hansen c568bb1baa ci: Skip frontend tests for Dependabot PRs 2022-01-28 01:51:15 -05:00
Richard Hansen 43aa1e4aeb ci: Reformat `.yml` files for readability 2022-01-28 01:39:45 -05:00
dependabot[bot] 84c7da82cf
build(deps): bump saucelabs/sauce-connect-action from 2.0.0 to 2.1.1
Bumps [saucelabs/sauce-connect-action](https://github.com/saucelabs/sauce-connect-action) from 2.0.0 to 2.1.1.
- [Release notes](https://github.com/saucelabs/sauce-connect-action/releases)
- [Changelog](https://github.com/saucelabs/sauce-connect-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/saucelabs/sauce-connect-action/compare/v2.0.0...v2.1.1)

---
updated-dependencies:
- dependency-name: saucelabs/sauce-connect-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-28 04:54:58 +00:00
Richard Hansen 35a182e053 ci: dependabot: Set `versioning-strategy` to `increase`
This keeps `package.json` in sync with `package-lock.json`.
2022-01-27 23:54:28 -05:00
Richard Hansen 63a02ec5fa ci: Enable caching 2022-01-27 22:40:38 -05:00
Richard Hansen 3732565f83 ci: plugins: Bump saucelabs/sauce-connect-action 2022-01-27 22:40:38 -05:00
Richard Hansen 737464935e ci: plugins: Enable dependabot 2022-01-27 22:05:47 -05:00
Richard Hansen f02334e589 ci: plugins: Install plugin deps before core deps 2022-01-27 22:05:47 -05:00
Richard Hansen e80e1c0221 ci: docker: Combine test and build+publish workflows 2022-01-27 22:05:47 -05:00
Richard Hansen a6fcc92d2a ci: docker: Set up Docker Buildx
This isn't required, but it's recommended everywhere I look.
2022-01-27 22:05:47 -05:00
Richard Hansen 3a31ebde4b ci: docker: Style improvements 2022-01-27 22:05:47 -05:00
Richard Hansen f334fb8280 ci: lockfile-lint: Whitelist specific sqlite version 2022-01-27 22:05:47 -05:00
Richard Hansen f925b481c6 ci: lockfile-lint: Pass `--no-save` to npm 2022-01-27 22:05:47 -05:00
Richard Hansen be36f764ad deps: Update eslint-config-etherpad 2022-01-27 22:05:47 -05:00
Richard Hansen 47f5bbef1c deps: Remove tiny-worker
It is not needed for modern versions of Node.js.
2022-01-27 02:15:47 -05:00
Richard Hansen c586502e3c deps: Bump marked to 4.0.12 2022-01-27 02:05:11 -05:00
Richard Hansen 9db3424403 deps: Bump rehype and rehype-minify-whitespace 2022-01-27 01:27:10 -05:00
Richard Hansen 1e604add99 deps: Require Node.js 12.17.0 or later
This makes it possible to use dynamic `import()`.
2022-01-27 01:27:10 -05:00
snyk-bot 151f954fea fix: upgrade rate-limiter-flexible from 2.3.5 to 2.3.6
Snyk has created this PR to upgrade rate-limiter-flexible from 2.3.5 to 2.3.6.

See this package in npm:
https://www.npmjs.com/package/rate-limiter-flexible

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2022-01-26 20:05:06 -05:00
dependabot[bot] 9b671efd5b build(deps): bump node-fetch from 2.6.6 to 2.6.7 in /src
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-26 20:03:19 -05:00
dependabot[bot] e44d1c4400 build(deps-dev): bump eslint-config-etherpad from 2.0.2 to 2.0.3 in /src
Bumps [eslint-config-etherpad](https://github.com/ether/eslint-config-etherpad) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/ether/eslint-config-etherpad/releases)
- [Commits](https://github.com/ether/eslint-config-etherpad/compare/v2.0.2...v2.0.3)

---
updated-dependencies:
- dependency-name: eslint-config-etherpad
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-26 20:02:42 -05:00
dependabot[bot] de66bd4799 build(deps): bump http-errors from 1.8.1 to 2.0.0 in /src
Bumps [http-errors](https://github.com/jshttp/http-errors) from 1.8.1 to 2.0.0.
- [Release notes](https://github.com/jshttp/http-errors/releases)
- [Changelog](https://github.com/jshttp/http-errors/blob/master/HISTORY.md)
- [Commits](https://github.com/jshttp/http-errors/compare/1.8.1...v2.0.0)

---
updated-dependencies:
- dependency-name: http-errors
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-26 20:01:53 -05:00
dependabot[bot] abe8a98a4d
build(deps-dev): bump mocha from 9.1.3 to 9.2.0 in /src
Bumps [mocha](https://github.com/mochajs/mocha) from 9.1.3 to 9.2.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.1.3...v9.2.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-27 00:58:49 +00:00
dependabot[bot] 867922c8d8 build(deps): bump follow-redirects from 1.14.6 to 1.14.7 in /src
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.6 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.6...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-26 19:56:56 -05:00
RichDavis1 ae9114f140 Edit settings.js
Added formal panics for invalid JSON.
2022-01-26 19:35:21 -05:00
Felix 578ae17aa8
Add docker & npm ecosystem to dependabot 2022-01-26 19:34:27 -05:00
translatewiki.net 315bcccc14 Localisation updates from https://translatewiki.net. 2022-01-24 13:03:53 +01:00
Richard Hansen e4a336e875 plugins: Add npm packages to etherpad org 2022-01-20 20:33:24 -05:00
Richard Hansen c7195b1133 docker: Add variables for cookie settings 2022-01-19 23:08:32 -05:00
Richard Hansen 861a929a43 docker: Sync `settings.json.docker` with `.template` 2022-01-19 23:06:56 -05:00
Richard Hansen 692749d1cf express-session: Extend session lifetime if user is active 2022-01-17 21:45:56 -05:00
Richard Hansen 9c1f52f1b0 express-session: Install package from `@etherpad` scope
This allows us to use some in-progress features.
2022-01-17 21:45:56 -05:00
Richard Hansen 023e58cfe6 express-session: Set a finite cookie lifetime 2022-01-17 21:45:56 -05:00
Richard Hansen ec10700dff express-session: Don't save uninitialized sessions
This should avoid frivolous session records, such as when the user
gets a 404 (unless login was required to see the 404).
2022-01-17 21:45:56 -05:00
Richard Hansen 7255dd7ef0 express-session: Inherit proxy trust from Express 2022-01-17 21:45:56 -05:00
Richard Hansen 945e6848e2 SessionStore: Delete DB record when session expires
This only deletes records known to the current Etherpad instance --
old records from previous runs are not automatically cleaned up.
2022-01-17 21:45:56 -05:00
Richard Hansen 72cd983f0f SessionStore: Option to update DB record on `touch()` 2022-01-17 21:45:52 -05:00
Richard Hansen b991948e21 SessionStore: Don't write DB record if already expired 2022-01-17 21:33:58 -05:00
Richard Hansen 4d498725c7 SessionStore: Improve cookie expiration check
* Don't mutate `sess.cookie.expires`.
  * Allow `sess.cookie` to be nullish.
  * Always compare `Date` objects.
2022-01-17 18:17:40 -05:00
Richard Hansen 928c598ecf tests: Add SessionStore backend tests 2022-01-17 17:51:08 -05:00
Richard Hansen efab3aed0c deps: Update ueberdb2 to 2.0.1 to get proper JSON support 2022-01-14 00:45:47 -05:00
Richard Hansen d3984aa621 express: Move `preAuthorize` hook after `express-session`
The `ep_openid_connect` plugin needs access to session state before
authorization checks are made (to securely redirect the user back to
the start page when authentication completes). Now that the
`expressPreSession` hook exists, the rationale for moving
`preAuthorize` before the `express-session` middleware is gone.

This change undoes the following commits:
  * bf35dcfc50
  * 0b1ec20c5c
  * 30544b564e
2022-01-14 00:44:54 -05:00
Richard Hansen 75637708c0 express: Move up `cookie-parser` middleware
This makes it possible for the `preAuthorize` and `preExpressSession`
hooks to easily read or set cookies.
2022-01-14 00:44:54 -05:00
Richard Hansen ab85db4426 webaccess: Silence prototype pollution warning 2022-01-14 00:44:54 -05:00
Richard Hansen dcd43e9849 webaccess: Use `.startsWith()` instead of `.search()` 2022-01-14 00:44:54 -05:00
translatewiki.net b9118c22ba Localisation updates from https://translatewiki.net. 2022-01-13 13:02:54 +01:00
Richard Hansen fd9b770579 PadManager: Refactor `padList` to avoid duplicate loads 2022-01-02 20:44:42 -05:00
Richard Hansen 66ce2b50a9 openapi: Convert `Promise.catch()` to `catch` block 2022-01-02 19:17:20 -05:00
Richard Hansen fa8bdb0348 promises: Add a comment explaining a subtlety in `Gate` 2022-01-02 18:57:44 -05:00
Richard Hansen a115c475ad promises: Expose `reject` in `Gate` 2022-01-02 18:57:44 -05:00
Richard Hansen b72db7ebd6 promises: Return a `Promise` from `Gate.then()`
It doesn't make sense to return a `Gate` from `Gate.then()`, and this
eliminates the semantically confusing constructor parameter.
2022-01-02 18:57:44 -05:00
Richard Hansen 78a67801f3 promises: Move Gate from `server.js` (to enable reuse) 2022-01-02 18:57:44 -05:00
Richard Hansen c8d45586c1 server: Fix stop Gate creation and check 2022-01-02 18:57:44 -05:00
Richard Hansen 10c55a2328 Changeset: Explain why number of removals doesn't matter 2021-12-31 22:53:59 -05:00
Richard Hansen 6495b1e6f4 tests: Disable deprecation warnings when testing deprecated functions 2021-12-31 22:15:03 -05:00
Richard Hansen c0471dd238 tests: Avoid deprecated `Changeset.opIterator` 2021-12-31 22:14:07 -05:00
webzwo0i 0af728ffee textLinesMutator: coverage for changed attributes in multiline keeps 2021-12-30 18:44:29 -05:00
webzwo0i 93447b7493 easysync tests: cover more string operation scenarios 2021-12-30 18:44:29 -05:00
webzwo0i 395cbc01bb Changeset.js: refine comments 2021-12-30 18:44:29 -05:00
webzwo0i 55c47efd4c easysync tests: add some more smartOpAssembler tests 2021-12-30 18:44:29 -05:00
webzwo0i 12ebca897d easysync: add clear method to stringAssembler 2021-12-30 18:44:29 -05:00
Chocobozzz 0cc15df9b9 Prevent pad translation and crash
Prevent "TypeError: Cannot read properties of null (reading 'sheet')"
exception because google chrome can translate `<style type="text/css" title="dynamicsyntax"></style>` title attribute
2021-12-22 17:46:32 +01:00
Richard Hansen cb257de8f9 Bump version to v1.9.0 for plugin `peerDependencies`
This allows plugins to depend on the not-yet-released API by bumping
their `peerDependencies` to `>=1.9.0`.

IMPORTANT: v1.9.0 IS NOT RELEASED YET. I tried to bump the version to
1.9.0-alpha.0 instead, but unfortunately that doesn't satisfy
`>=1.8.6` which would break just about every plugin.
2021-12-21 17:23:56 -05:00
Richard Hansen 02a56dc58c PadMessageHandler: Allow `handleMessageSecurity` to grant one-time write access 2021-12-21 17:23:56 -05:00
Richard Hansen 31b025bd9d PadMessageHandler: Pass session info to `handleMessageSecurity` hook 2021-12-21 17:23:56 -05:00
Richard Hansen 1b52c9f0c4 PadMessageHandler: Deprecate `client` context property 2021-12-21 17:23:56 -05:00
Richard Hansen 8539a66439 docs: Improve `handleMessageSecurity` documentation 2021-12-21 17:23:56 -05:00
Richard Hansen f1856cf95a Docker: Use new `/health` endpoint for HEALTHCHECK 2021-12-21 17:19:56 -05:00
Richard Hansen 11de525508 Docker: Install and use link for `etherpad` binary 2021-12-21 17:19:56 -05:00
Richard Hansen 83f2898723 package.json: Define `etherpad` binary 2021-12-21 17:19:56 -05:00
Richard Hansen 696f9c3367 specialpages: New `/health` endpoint for health checking
This endpoint is intended to conform with:
https://www.ietf.org/archive/id/draft-inadarei-api-health-check-06.html
2021-12-21 17:19:56 -05:00
Dirk Jagdmann 2e4c546c7f Pad: Add new `.spliceText()` method
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-12-21 17:00:18 -05:00
Richard Hansen 30544b564e express: Skip express-session middleware if pre-authorized 2021-12-20 20:08:19 -05:00
Richard Hansen 649fbdccf5 express: Move static handlers to `expressPreSession`
This avoids the need to exempt the paths from authentication checks,
and it eliminates unnecessary express-session state.
2021-12-20 20:08:19 -05:00
Richard Hansen 72f4ae444d express: New `expressPreSession` server-side hook 2021-12-20 20:08:19 -05:00
Richard Hansen 0b1ec20c5c express: Move `preAuthorize` middleware before express-session 2021-12-20 20:08:19 -05:00
Richard Hansen bf35dcfc50 webaccess: Move `preAuthorize` to its own middleware 2021-12-20 20:08:19 -05:00
Richard Hansen 7f3d0e71f7 express: Check access before `expressConfigure` middleware
There are no guarantees about the order of execution of hook
functions, which means that a plugin's `expressConfigure` hook
function could theoretically register a handler/middleware before the
access check middleware is registered. If that happens, the plugin's
handler would run before the access check, which would be bad. Avoid
the problem by explicitly installing the `webaccess.checkAccess`
middleware before running the `expressConfigure` hook.
2021-12-20 20:08:18 -05:00
Richard Hansen 472eddc821 webaccess: Skip checks if `next` is called in `preAuthenticate` 2021-12-20 20:08:18 -05:00
Richard Hansen fc498f0ae6 tests: Delete test pad before attempting import 2021-12-20 20:08:18 -05:00
Richard Hansen c4b25388ae docs: Server-side hook documentation improvements 2021-12-20 20:08:18 -05:00
Richard Hansen 02d1b90d30 tests: Factor out USER_CHANGES/ACCEPT_COMMIT helpers
This will make it possible for other tests to reuse the code.
2021-12-19 16:53:24 -05:00
snyk-bot 674a0ccedc fix: upgrade openapi-backend from 5.0.0 to 5.0.1
Snyk has created this PR to upgrade openapi-backend from 5.0.0 to 5.0.1.

See this package in npm:
https://www.npmjs.com/package/openapi-backend

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-12-19 00:54:20 -05:00
webzwo0i 8b73f2ee70 padurlsanitize: Don't crash if `sanitizePadId()` throws
Let Express send a 500 status code to the user instead.

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-12-18 18:47:01 -05:00
Richard Hansen 4733c7d8d3 SessionStore: Promisify to the extent permitted by express-session 2021-12-18 18:29:04 -05:00
webzwo0i 694d3f630e SessionStore: Propagate database errors to express-session
Send a 500 HTTP status code to the client if the session entry could
not be fetched from the database. This is useful in case the database
is busy and can't respond to the query in time. In this case we want
to abort the client connection as soon as possible.

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-12-18 18:29:04 -05:00
Richard Hansen 7572040836 Pad: Simplify `Pad.copy()` logic 2021-12-18 18:28:58 -05:00
webzwo0i 0040f5984e db: await more database operations
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-12-18 18:23:27 -05:00
translatewiki.net e64462323b Localisation updates from https://translatewiki.net. 2021-12-16 13:03:26 +01:00
Richard Hansen 748d661495 Changeset: Fix off-by-one bug in `makeSplice` 2021-12-16 00:48:07 -05:00
Richard Hansen 30d68df396 Changeset: Add range checks to `makeSplice` 2021-12-16 00:48:07 -05:00
Richard Hansen fdf1fdbc23 Changeset: Improve readability of `makeSplice()` 2021-12-16 00:48:07 -05:00
Richard Hansen b1d0848701 Pad: Improve readability of `appendText` 2021-12-16 00:48:07 -05:00
Richard Hansen a6bf7816ce Pad: Simplify `setText` 2021-12-16 00:48:07 -05:00
Robert Geislinger 10e2b09b96 Update http_api.md
The current version is 1.2.15 or bigger if you look at e.g. copyPadWithoutHistory
2021-12-14 01:16:38 -05:00
snyk-bot 3693a0574f fix: upgrade jsdom from 18.1.0 to 18.1.1
Snyk has created this PR to upgrade jsdom from 18.1.0 to 18.1.1.

See this package in npm:
https://www.npmjs.com/package/jsdom

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-12-14 01:05:47 -05:00
Richard Hansen d94f380141 API: Fix race conditions in `setText`, `appendText`, `restoreRevision` 2021-12-14 01:02:00 -05:00
Richard Hansen cff089e54e PadMessageHandler: Accept retransmissions of USER_CHANGES 2021-12-14 01:02:00 -05:00
Richard Hansen a370cfa5c6 Pad: Don't create no-op revisions 2021-12-14 01:02:00 -05:00
Richard Hansen 56b7671422 Pad: Return new rev number from `appendRevision()` 2021-12-14 01:02:00 -05:00
Richard Hansen c05ee7ce72 PadMessageHandler: Move `ACCEPT_COMMIT` after changeset save 2021-12-14 01:02:00 -05:00
Richard Hansen dbacc73c36 tests: Basic USER_CHANGES backend tests 2021-12-14 01:02:00 -05:00
translatewiki.net 2cae414473 Localisation updates from https://translatewiki.net. 2021-12-13 13:03:50 +01:00
Richard Hansen 1fe01c66fd getCorePlugins.sh: Various improvements
* Factor out plugin query.
  * Make idempotent.
  * Improve logging.
  * Install by symlinking to a parallel directory rather than cloning
    into `etherpad-lite/node_modules`.
2021-12-11 02:01:35 -05:00
Richard Hansen 5915c2243d checkPlugin: Redo README.md and LICENSE 2021-12-11 02:01:35 -05:00
Richard Hansen d81546ad7b checkPlugin: Delete Travis badge from README.md template 2021-12-11 02:01:35 -05:00
Richard Hansen 2c05de7033 checkPlugin: Update ESLint dependencies 2021-12-11 02:01:35 -05:00
Richard Hansen 3563fc1df9 checkPlugin: Relax repo checks 2021-12-11 02:01:35 -05:00
Richard Hansen 4716975c37 checkPlugin: Do case-sensitive filename checks 2021-12-11 02:01:35 -05:00
Richard Hansen 9a85bce212 checkPlugin: Only consider `README{,.md}` (case-insensitive)
This avoids false positives such as `README-foo.md`.
2021-12-11 02:01:35 -05:00
Richard Hansen 753d16af8a checkPlugin: Promisify file system accesses 2021-12-11 02:01:35 -05:00
Richard Hansen b50c6d07d4 checkPlugin: Improve readability of `files` assignment 2021-12-11 02:01:35 -05:00
Richard Hansen b546867adb checkPlugin: Replace `.indexOf()` with `.includes()` 2021-12-11 02:01:35 -05:00
Richard Hansen 34a4a74634 checkPlugin: Change `autocommit` to not push 2021-12-11 02:01:35 -05:00
Richard Hansen 48222449b5 checkPlugin: Add `frontend-tests.yml` GitHub workflow 2021-12-11 02:01:35 -05:00
Richard Hansen 51c530a3a0 checkPlugin: Compare entire file 2021-12-11 02:01:34 -05:00
Richard Hansen f0669a8d31 checkPlugin: Automatically determine plugin name in `backend-tests.yml` 2021-12-11 02:01:34 -05:00
Richard Hansen 314b67b7fe checkPlugin: Improve `eslintConfig`, `funding`, `scripts` checking 2021-12-11 02:01:34 -05:00
Richard Hansen b7dce95802 checkPlugin: Use `updateDeps` to manage `engine` 2021-12-10 14:44:02 -05:00
Richard Hansen f0ab112c2d checkPlugin: Factor out duplicate file update logic and simplify 2021-12-10 14:44:02 -05:00
Richard Hansen b7de4faf42 checkPlugin: Don't bump version if there are no changes 2021-12-10 14:44:01 -05:00
Richard Hansen 4d457f6296 ImportHandler: Pass `ImportError` to `import` hook 2021-12-10 02:34:13 -05:00
translatewiki.net d1da8f1ebd Localisation updates from https://translatewiki.net. 2021-12-09 13:03:48 +01:00
translatewiki.net 841bc10039 Localisation updates from https://translatewiki.net. 2021-12-06 13:03:04 +01:00
John McLear 6cca27dea6 API: `getText` with old revision should only return text, not atext
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-12-05 18:50:39 -05:00
Richard Hansen 75ee1ef535 Docker: Add `.git/rr-cache/` to `.dockerignore` 2021-12-05 17:33:59 -05:00
Richard Hansen 99fae2ec6e pad: Fix application of `padOptions` values from `settings.json` 2021-12-04 23:06:17 -05:00
Richard Hansen f8b4189bc4 pad: Always pass strings to pad option callbacks 2021-12-04 23:06:17 -05:00
Richard Hansen 8c857a85ac pad: Use `null` as default for `userName`, `userColor` options
These options are used as strings, so it doesn't make sense to default
them to a boolean value.

Note that this change has no effect due to a bug in how pad options
are processed; that bug will be fixed in a future commit.
2021-12-04 23:06:16 -05:00
Richard Hansen 61b608e264 pad: Use `null` as default for `lang` option
It doesn't make sense to override the browser's language with `en-gb`
by default.

Note that this change has no effect due to a bug in how pad options
are processed; that bug will be fixed in a future commit.
2021-12-04 23:06:16 -05:00
Richard Hansen 7ff71cd41e pad: Ignore `null` values in `padOptions` from `settings.json` 2021-12-04 23:06:16 -05:00
Richard Hansen f4257a28ba pad: Delete duplicate `decodeURIComponent()` calls
`URL.searchParams` already decodes the value.

Also delete some useless comments.
2021-12-04 23:06:09 -05:00
Richard Hansen 6beb5dcaf5 tests: Disable deprecation warnings when testing deprecated functions 2021-11-30 23:17:35 -05:00
Richard Hansen c4f18a9b3a padutils: Rename `warnWithStack()` to `warnDeprecated()`
This makes it more legitimate for tests to disable the warnings when
testing deprecated functionality.
2021-11-30 23:11:23 -05:00
dependabot[bot] e4944b8bfa Bump saucelabs/sauce-connect-action from 1.1.2 to 2.0.0
Bumps [saucelabs/sauce-connect-action](https://github.com/saucelabs/sauce-connect-action) from 1.1.2 to 2.0.0.
- [Release notes](https://github.com/saucelabs/sauce-connect-action/releases)
- [Changelog](https://github.com/saucelabs/sauce-connect-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/saucelabs/sauce-connect-action/compare/v1.1.2...v2.0.0)

---
updated-dependencies:
- dependency-name: saucelabs/sauce-connect-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 22:32:27 -05:00
dependabot[bot] 68933718f6
Bump joncloud/makensis-action from 3.4 to 3.6
Bumps [joncloud/makensis-action](https://github.com/joncloud/makensis-action) from 3.4 to 3.6.
- [Release notes](https://github.com/joncloud/makensis-action/releases)
- [Commits](https://github.com/joncloud/makensis-action/compare/v3.4...v3.6)

---
updated-dependencies:
- dependency-name: joncloud/makensis-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-30 02:05:07 +00:00
Richard Hansen 40854b0cfd GitHub workflow to build and publish Docker images 2021-11-29 21:02:41 -05:00
Richard Hansen df459c1278 Enable Dependabot for GitHub Actions 2021-11-29 20:35:29 -05:00
Richard Hansen 306e46c21d Docker: Upgrade Debian packages 2021-11-29 03:52:46 -05:00
Tommy 48080411fc Docker: Update to the latest LTS image
The Node.js 14 slim image has quite a few vulnerabilities, and I have
tested the latest slim image. It works just fine.

When installing plugins, `--legacy-peer-deps` is passed to npm because
npm v7 (which comes with Node.js v16, the current LTS) changed how
peer deps are handled. The new behavior is incompatible with how
plugins have historically been installed.
2021-11-29 03:52:46 -05:00
Richard Hansen a02e45499d Use the new AttributeMap and Changeset APIs 2021-11-28 23:47:27 -05:00
Richard Hansen f00b1ae89b Merge branch 'master' into develop 2021-11-28 23:10:45 -05:00
Richard Hansen 142a47cbbc Release v1.8.16 2021-11-28 23:03:58 -05:00
Richard Hansen 77bcb507b3 ImportEtherpad: Limit in-flight DB queries 2021-11-28 22:28:55 -05:00
Richard Hansen 5b3575acf0 ImportEtherpad: Use AttributePool to check attributes 2021-11-28 22:28:55 -05:00
Richard Hansen 19909eae53 ImportEtherpad: Rigorously check imported data 2021-11-28 22:28:55 -05:00
Richard Hansen 885ff3bcde Pad: Move `padLoad` hook invocation to `PadManager.js`
This puts global state change logic with the rest of the global state
management logic. This also makes it possible to create temporary Pad
objects without triggering plugin actions.
2021-11-28 22:28:55 -05:00
Richard Hansen f7d4abdabe Pad: Inject the database dependency 2021-11-28 22:28:55 -05:00
Richard Hansen 7c870f8a58 Pad: Add strict validation checks 2021-11-28 22:28:55 -05:00
Richard Hansen 2608a81654 Changeset: Stricter validation checks 2021-11-28 22:28:55 -05:00
Richard Hansen ad78b24113 ImportEtherpad: Warn about unsupported attrib at encounter 2021-11-28 22:28:55 -05:00
Richard Hansen 23f8a12922 ImportEtherpad: Don't make any changes if data is bad 2021-11-28 22:28:55 -05:00
Richard Hansen a2e77a7128 ImportEtherpad: Enforce single-pad records 2021-11-28 22:28:54 -05:00
Richard Hansen 33778281b9 ImportEtherpad: Simplify attribute key iteration 2021-11-28 22:28:54 -05:00
Richard Hansen 00fc7c8e86 ImportEtherpad: Reject unknown DB records 2021-11-28 22:27:44 -05:00
Richard Hansen 8e9bc8d325 ImportEtherpad: Avoid false positives when checking apool 2021-11-28 19:00:44 -05:00
Richard Hansen 003e5cbd4b ImportEtherpad: Fix DB key pad ID transformation 2021-11-28 19:00:44 -05:00
Richard Hansen fea7948b05 ImportEtherpad: Fix author info processing 2021-11-28 19:00:44 -05:00
Richard Hansen 777d045246 GroupManager: Clean up any mappings when deleting a group 2021-11-28 14:06:47 +00:00
Richard Hansen 5b37a56197 GroupManager: Use `.setSub()` and parallel queries to avoid races
This also simplfies the code.
2021-11-27 22:20:03 -05:00
Richard Hansen 9d63700da0 SessionManager: Use `.setSub()` and parallel queries to avoid races
This also simplfies the code.
2021-11-27 22:20:03 -05:00
Timon Engelke 3070cee9ca Delete group after removing it from the group list 2021-11-27 22:20:03 -05:00
Timon Engelke 09c9e32d72 Delete session after corresponding group2session and author2session 2021-11-27 22:20:03 -05:00
Richard Hansen ec5f2b125f Merge branch 'master' into develop 2021-11-25 18:40:29 -05:00
Richard Hansen 2f0561abc0 ImportEtherpad: Remove unnecessary variable 2021-11-25 18:39:07 -05:00
Richard Hansen 9bc90128cb ImportEtherpad: Fix async logic 2021-11-25 18:39:07 -05:00
Richard Hansen b7065eb9a0 Add notable enhancements/fixes to 1.8.15 changelog 2021-11-25 18:39:01 -05:00
Richard Hansen bbd71cea22 Refine `CHANGELOG.md` 2021-11-25 18:39:01 -05:00
webzwo0i 0983985dd5 easysync tests: Split into multiple files 2021-11-23 21:07:08 -05:00
webzwo0i 617515bcbb easysync tests: Group related tests 2021-11-23 21:07:08 -05:00
webzwo0i 310444f5d3 easysync tests: Rename tests 2021-11-23 21:07:08 -05:00
webzwo0i ec3833ab66 easysync tests: Convert IIFE into a `describe()` 2021-11-23 21:07:08 -05:00
Richard Hansen 6a7b54313f easysync tests: Move shared helper functions to the top
This will make it easier to split `easysync.js` into multiple files.
2021-11-23 21:07:08 -05:00
Richard Hansen d3427240c6 tests: Serve all of `src/tests/frontend/`, not just specs 2021-11-23 21:07:07 -05:00
Richard Hansen 89fe40e080 Changeset: Migrate from `OpIter` to `deserializeOps()` 2021-11-23 01:21:49 -05:00
Richard Hansen 0eca0251f2 Changeset: Use a generator to implement `OpIter` 2021-11-23 01:21:49 -05:00
Richard Hansen a4aec006dc Changeset: Turn `opIterator()` into a real class 2021-11-23 01:21:12 -05:00
Richard Hansen 86959f7ebc Changeset: Throw on unexpected chars while iterating ops 2021-11-23 01:21:12 -05:00
Richard Hansen 657492e191 Changeset: Turn `newOp()` into a real class 2021-11-23 01:21:12 -05:00
Richard Hansen fba0bb6dff Changeset: Turn `textLinesMutator()` into a real class 2021-11-23 01:21:12 -05:00
Richard Hansen dab881139d Pad: Fix `copyPadWithoutHistory` apool corruption bug 2021-11-22 18:40:22 -05:00
Richard Hansen ed78b56079 tests: Refine `copyPadWithoutHistory` tests 2021-11-22 18:40:22 -05:00
Richard Hansen d74dd235a4 Changeset: Replace `appendATextToAssembler()` with a generator 2021-11-22 18:10:37 -05:00
Richard Hansen 9cd59a84af
Fix bug_report.md bug template 2021-11-22 17:25:00 -05:00
Richard Hansen 9e772df991 deps: Bump dependencies 2021-11-21 21:31:53 -05:00
Richard Hansen 2fc06a0884 Changeset: Add TODO comments for issues noticed 2021-11-21 04:11:41 -05:00
Richard Hansen f1eb7a25a6 Changeset: Migrate to the new attribute API 2021-11-21 04:11:41 -05:00
Richard Hansen f40d285109 tests: Refine contentcollector tests 2021-11-21 04:11:41 -05:00
Richard Hansen 1f227200da Replace separate attrib key, value calls with single pair call 2021-11-21 04:11:41 -05:00
Richard Hansen 6cf2055199 Changeset: New API to simplify attribute processing 2021-11-21 04:11:41 -05:00
Richard Hansen 982d8ad0f2 Changeset: Refactor `makeAttribsString` for readability 2021-11-21 04:11:41 -05:00
Richard Hansen 9e7b142bb7 Invert conditions to improve readability 2021-11-21 04:11:41 -05:00
Richard Hansen cdad5c3325 docs: Improve `getLineHTMLForExport` server-side hook docs 2021-11-21 04:11:41 -05:00
Richard Hansen 93abc31936 changesettracker: Fix author attribute ID fetch 2021-11-21 04:11:41 -05:00
Richard Hansen d0e74ada2f changesettracker: Remove unnecessary `.numToAttrib` check 2021-11-21 04:11:41 -05:00
Richard Hansen 3ec5e84737 lint: Update ESLint dependencies 2021-11-21 03:34:19 -05:00
snyk-bot cddd78d892 fix: upgrade formidable from 1.2.2 to 1.2.6
Snyk has created this PR to upgrade formidable from 1.2.2 to 1.2.6.

See this package in npm:
https://www.npmjs.com/package/formidable

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-11-21 03:11:38 -05:00
snyk-bot ff0f81161f fix: upgrade async from 3.2.1 to 3.2.2
Snyk has created this PR to upgrade async from 3.2.1 to 3.2.2.

See this package in npm:
https://www.npmjs.com/package/async

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-11-21 03:06:12 -05:00
snyk-bot dd9814a4b8 fix: upgrade clean-css from 5.2.1 to 5.2.2
Snyk has created this PR to upgrade clean-css from 5.2.1 to 5.2.2.

See this package in npm:
https://www.npmjs.com/package/clean-css

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-11-21 03:04:52 -05:00
snyk-bot 7ed980aa59 fix: upgrade rate-limiter-flexible from 2.3.1 to 2.3.2
Snyk has created this PR to upgrade rate-limiter-flexible from 2.3.1 to 2.3.2.

See this package in npm:
https://www.npmjs.com/package/rate-limiter-flexible

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-11-21 03:04:31 -05:00
Richard Hansen 8274e01d34 Add notable enhancements/fixes to 1.8.15 changelog 2021-11-21 01:40:24 -05:00
Richard Hansen 978555653b Refine `CHANGELOG.md` 2021-11-21 01:40:24 -05:00
John McLear 90aead6eae Merge branch 'master' into develop 2021-11-20 15:20:41 +00:00
John McLear 868c6852de Merge branch 'develop' 2021-11-20 15:20:37 +00:00
John McLear 2e19087cb9 bump version 2021-11-20 15:20:35 +00:00
Richard Hansen ae1741c25b PadMessageHandler: Add missing `parseNum()` for attribute lookup 2021-11-20 01:24:30 -05:00
Richard Hansen a052580bd1 PadMessageHandler: Stop the USER_CHANGES timer on exception 2021-11-20 01:24:30 -05:00
Richard Hansen 97e382e5d2 PadMessageHandler: Move USER_CHANGES processing inside `try`
This improves the accuracy of the timing stats, and it simplifies
error handling.
2021-11-20 01:24:30 -05:00
Richard Hansen b1c1501e1e PadMessageHandler: Use object destructuring 2021-11-20 01:24:30 -05:00
Richard Hansen e961718ff2 PadMessageHandler: Improve error logging
Use a log4js logger instead of `console`, and clean up some of the log
messages.
2021-11-20 01:24:30 -05:00
Richard Hansen 1447ab8899 PadMessageHandler: Factor out common USER_CHANGES error message formatting 2021-11-20 01:24:30 -05:00
Richard Hansen 35b2aeb3b1 PadMessageHandler: Factor out duplicate bad USER_CHANGES handling
This also fixes a double-count bug.
2021-11-20 01:24:30 -05:00
Richard Hansen 85919ff914 PadMessageHandler: Replace `channels` package with async-friendly class 2021-11-20 01:24:30 -05:00
Richard Hansen 5c1177a3d9 PadMessageHandler: Switch from nodeify to util.callbackify 2021-11-20 01:24:30 -05:00
Richard Hansen abf4eeeb17 ImportHtml: Wait for HTML processing to complete 2021-11-20 01:24:00 -05:00
Richard Hansen 50dce085c2 ImportHtml: In-line an unnecessary function 2021-11-20 01:24:00 -05:00
Richard Hansen afdb01681a ImportHtml: Reuse the HTML processor 2021-11-20 01:24:00 -05:00
Richard Hansen db105e8650 ImportHtml: Get the logger once 2021-11-20 01:24:00 -05:00
Richard Hansen 6e19d888d3 docs: Check in `src/bin/doc/package-lock.json`
Looks like this was accidentally deleted in commit
4a65acf417.
2021-11-20 01:09:50 -05:00
John McLear b540c2bc48 release: Add version to changelog 2021-11-19 15:27:40 +00:00
Richard Hansen 24b22e3a6d MinifyWorker: Fix buggy error handling in `compressCSS` 2021-11-19 02:47:17 -05:00
Richard Hansen 98f0e931fe MinifyWorker: Promisify `compressCSS` 2021-11-19 02:47:17 -05:00
Richard Hansen c94906f1f8 MinifyWorker: Delete unhelpful comment
The comment should have been a commit message instead.
2021-11-19 02:47:17 -05:00
Richard Hansen a65498e849 Changeset: Move `SmartOpAssembler.appendOpWithText()` to a standalone function 2021-11-14 04:17:00 -05:00
Richard Hansen eae814f5a0 pad_utils: New `warnWithStack()` function 2021-11-14 04:15:10 -05:00
Richard Hansen 1bbe0d9215 Changeset: Use `in` check to help TypeScript narrowing 2021-11-13 17:44:38 -05:00
Richard Hansen 4f4a775d9e Changeset: Improve handling of missing attribute in old pool 2021-11-13 17:44:38 -05:00
Richard Hansen b62534a6b2 Changeset: Use Maps to simplify attribute processing 2021-11-13 17:44:38 -05:00
Richard Hansen 9401ae876b Changeset: Sort attributes by keys, not full string rep 2021-11-13 17:44:38 -05:00
Richard Hansen 1cad5d881a Changeset: Use `for...of` iteration to improve readability 2021-11-13 17:44:38 -05:00
Richard Hansen 6d5b737140 Changeset: Replace `.apply()` with spread operator 2021-11-13 17:44:38 -05:00
Richard Hansen 9c17b03660 Changeset: Require Op opcode and attribs to be strings 2021-11-13 17:44:38 -05:00
Richard Hansen 0ae8fb1441 Changeset: Use string concatenation instead of array join
People report that string concatenation is faster. Also, I think it's
more readable.
2021-11-13 17:44:38 -05:00
Richard Hansen 097f2623c6 Changeset: Add sanity checks to `slicerZipperFunc()` 2021-11-13 17:44:38 -05:00
Richard Hansen efeb69b4ea Changeset: Simplify `slicerZipperFunc()` 2021-11-13 17:44:38 -05:00
Richard Hansen 42d4d8269c Changeset: Refactor `appendATextToAssembler()` for readability 2021-11-13 17:44:38 -05:00
Richard Hansen ca5bdddc59 Changeset: Use `break` instead of `done` variable 2021-11-13 17:44:38 -05:00
Richard Hansen 44d99733c6 Changeset: Check `.hasNext()` before calling `.next()` 2021-11-13 17:44:38 -05:00
Richard Hansen 1955e7b263 Changeset: Replace output params with return values
This improves readability and reduces the chances of introducing a
bug.
2021-11-13 17:44:38 -05:00
Richard Hansen 94f5507671 Changeset: Improve `copyOp()` API
Use `Object.assign()` to implement `copyOp()`, which simplifies the
code and provides a return value. Also make the second op optional.
2021-11-13 17:44:38 -05:00
Richard Hansen 02ef78e174 Changeset: Make sure `opOut` is cleared
`slicerZipperFunc()` previously assumed the provided `opOut` argument
was a null Op. Enforce this by clearing it at the beginning.
2021-11-13 17:44:38 -05:00
Richard Hansen 18a6b7279c Changeset: Only pass strings to `parseNum()` 2021-11-13 17:44:38 -05:00
Richard Hansen 7ec0d5f385 Changeset: Remove unnecessary `linesApplySplice()` 2021-11-13 17:44:38 -05:00
Richard Hansen 37bb297e76 Changeset: Improve logged error message
I saw this on a production system today and wanted more information.
2021-11-13 17:44:38 -05:00
Richard Hansen 7fa9b07116 Changeset: Invert conditions to improve readability 2021-11-13 17:44:38 -05:00
Richard Hansen b29e59419e Changeset: Factor out duplicate code 2021-11-13 17:44:38 -05:00
Richard Hansen 4a65c2c8ff Changeset: Unexport unnecessarily exported functions
These functions aren't used outside of this file.
2021-11-13 17:44:38 -05:00
Richard Hansen 085bc8cbb3 plugins: Don't create `.ep_initialized` files
These files cause problems with Docker images and read-only
directories/mounts, and they have dubious value (any install-time
setup should instead be done at startup).
2021-11-13 17:43:33 -05:00
Richard Hansen 263105d185 tests: Remove overly aggressive timeouts 2021-11-13 03:05:38 -05:00
Richard Hansen 3c6aef11bd lint: Add `'use strict';` 2021-11-13 03:02:40 -05:00
Richard Hansen 0f7c5a8782 lint: Use `window.` to avoid global declaration 2021-11-12 23:45:05 -05:00
Richard Hansen 19e9c2f114 adminsettings: Pay attention to `--settings` 2021-11-12 23:45:05 -05:00
Richard Hansen 46ad93024d adminsettings: Promisify 2021-11-12 23:45:05 -05:00
Richard Hansen 4e2f816665 adminsettings: Use object destructuring 2021-11-12 23:45:05 -05:00
Timon Engelke b0a7237443 Fix comparison between CustomError and string 2021-11-12 23:40:20 +01:00
Richard Hansen 6d773f7d56 Put regression tests with the bugfix commit, mention bug in PR 2021-11-10 00:26:10 -05:00
webzwo0i 8b73b911c9 Changeset: Use string templates
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-11-09 01:05:53 +01:00
translatewiki.net cb95e5907c Localisation updates from https://translatewiki.net. 2021-11-08 13:04:14 +01:00
Richard Hansen cc688f7367 ace: Delete dead code 2021-11-07 23:24:39 -05:00
Richard Hansen 5283bfc14a linestylefilter: Delete unused arguments 2021-11-07 23:24:39 -05:00
Richard Hansen dd8ec4e291 Changeset: Remove unused `lastIndex()` method from op iterator 2021-11-07 23:24:39 -05:00
Richard Hansen 0fd2a46783 Changeset: Remove unused start index parameter for `opIterator()` 2021-11-07 23:24:39 -05:00
Richard Hansen 43dae4cb1d Changeset: Delete unused index parameters in `applyZip()` 2021-11-07 23:24:24 -05:00
Richard Hansen b3215992c9 changesettracker: Delete IE8 compatibility code 2021-11-07 22:42:31 -05:00
Richard Hansen 9f66ffbc3b Pad: Delete no-op call to `SmartOpAssembler.appendOpWithText()` 2021-11-07 22:42:31 -05:00
Richard Hansen ad6de52eb2 Changeset: More JSDoc comment improvements 2021-11-07 22:42:31 -05:00
Richard Hansen caefd2184a PadMessageHandler: Don't fire `userLeave` if user hasn't joined yet 2021-11-07 01:30:39 -04:00
Richard Hansen 87a490d456 docs: `import` hook `fileEnding` has leading period 2021-11-06 01:05:55 -04:00
snyk-bot 088fb14784 fix: upgrade express-rate-limit from 5.4.1 to 5.5.0
Snyk has created this PR to upgrade express-rate-limit from 5.4.1 to 5.5.0.

See this package in npm:
https://www.npmjs.com/package/express-rate-limit

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-11-05 18:17:27 -04:00
Richard Hansen 56cb08f4c5 pad: Pass color and display name in `CLIENT_READY` 2021-11-05 18:14:27 -04:00
Richard Hansen 7a0d8cb52e pad: Use URLSearchParams to process search params
Also unexport `getUrlVars` because it isn't used outside the file.
2021-11-05 18:14:27 -04:00
Richard Hansen fe87e2df87 ImportHandler: Pass the pad ID to the `import` hook
This enables plugins to log the pad ID if desired.
2021-11-05 17:19:54 -04:00
Richard Hansen caf4e9f28c ImportHandler: Use truthiness to signal conversion handled 2021-11-05 17:19:54 -04:00
Richard Hansen edf99dc811 docs: Document the `import` server-side hook 2021-11-05 17:19:54 -04:00
translatewiki.net cc4772a99e Localisation updates from https://translatewiki.net. 2021-11-04 13:03:08 +01:00
Richard Hansen 6bf8142221 chat: Translate newly created message entries 2021-11-01 04:56:46 -04:00
Richard Hansen 99b7bdd176 chat: Set timestamp CSS `font-size: smaller;` 2021-11-01 01:54:29 -04:00
Richard Hansen 51907015ed chat: Fix gritter duration 2021-11-01 01:54:29 -04:00
Richard Hansen 23f963c9fe chat: Improve name mention detection 2021-11-01 01:54:29 -04:00
Richard Hansen 26675c5019 chat: New `chatNewMessage` server-side hook 2021-11-01 01:54:29 -04:00
Richard Hansen 23a98e5946 tests: Refactor `waitForSocketEvent()` to improve readability 2021-11-01 01:54:29 -04:00
Richard Hansen 3132235f2c tests: Rename `getSocketEvent()` to `waitForSocketEvent()` 2021-11-01 01:54:29 -04:00
Richard Hansen 65bd597053 tests: Move socket.io connection helpers to `common.js` 2021-11-01 01:54:28 -04:00
Richard Hansen bea57ff249 tests: Use `logger` variable for consistency 2021-11-01 01:54:28 -04:00
Richard Hansen 9fbd2e5c3d chat: New `chatSendMessage` client-side hook 2021-11-01 01:54:28 -04:00
Richard Hansen 4c2f7f9a11 chat: Rename `userId` to `authorId`, `userName` to `displayName` 2021-11-01 01:54:28 -04:00
Richard Hansen 0f47ca9046 chat: Plumb message object end to end
This will make it possible for future commits to add hooks that allow
plugins to augment chat messages with arbitrary metadata.
2021-11-01 01:54:28 -04:00
Richard Hansen f1f4ed7c58 chat: Allow `chatNewMessage` hook to control rendering 2021-11-01 01:54:28 -04:00
Richard Hansen 2597b940f4 chat: Give `chatNewMessage` hook access to the raw message object 2021-11-01 01:54:28 -04:00
Richard Hansen fc5a3f553d chat: Test processing in `chatNewMessage` hook 2021-11-01 01:54:28 -04:00
Richard Hansen caac4bf711 chat: Promisify `addMessage()` 2021-11-01 01:54:28 -04:00
Richard Hansen 3f7f629eeb chat: Scroll down after the `chatNewMessage` hook finishes 2021-11-01 01:54:28 -04:00
Richard Hansen 195a6bd81b chat: Move click handler setup to `init()` 2021-11-01 01:54:28 -04:00
Richard Hansen c8dbf35fe4 docs: Improve `chatNewMessage` client-side hook documentation 2021-11-01 01:54:28 -04:00
Richard Hansen 23037280a8 Pad: Simplify `getChatMessages()` 2021-11-01 01:54:28 -04:00
Richard Hansen e471cb12e6 tests: Also spy on initially loaded chat messages 2021-11-01 01:54:28 -04:00
Richard Hansen 66a8c48fac tests: Save the CHAT_MESSAGE payload, not the wrapper 2021-11-01 01:54:28 -04:00
Richard Hansen c8e0916e1a tests: Spy on socket.io messages as early as possible 2021-11-01 01:54:28 -04:00
Richard Hansen e28c9ffc97 tests: Support injecting hook functions during pad load 2021-11-01 01:54:28 -04:00
Richard Hansen c8e544ec8d tests: Fix handling of nullish module definitions 2021-11-01 01:54:28 -04:00
Peter VandeHaar 9987834b15 Clarify instructions in PULL_REQUEST_TEMPLATE.md
This change
- removes instructions about commit headers that nobody follows,
- links to useful resources for first-time contributors,
- simplifies some text, and
- hides all text inside <!--  -->.
2021-10-31 02:40:03 -04:00
Richard Hansen 9aaf781548 PadMessageHandler: Modernize `userLeave` hook context properties 2021-10-30 03:07:44 -04:00
Richard Hansen a6d060d67b PadMessageHandler: Replace `clientReady` hook with new `userJoin` hook 2021-10-30 03:07:44 -04:00
Richard Hansen c98910e1c5 PadMessageHandler: Populate session info as early as possible 2021-10-30 03:07:44 -04:00
Richard Hansen b7de24c85f PadMessageHandler: Fix readability of duplicate user check 2021-10-30 03:07:44 -04:00
Richard Hansen 00e7b04518 PadMessageHandler: Improve readability of changeset loading 2021-10-30 03:07:44 -04:00
Richard Hansen 50b9e0df1f PadMessageHandler: Use values from session info object
This is more consistent with the rest of the code, and it provides a
single source of truth.
2021-10-30 03:07:40 -04:00
Richard Hansen 10e930408c PadMessageHandler: Delete unnecessary CLIENT_READY checks
The checks are already performed by the security manager.
2021-10-30 03:06:57 -04:00
Richard Hansen 0992f19570 PadMessageHandler: Improve readability of historical author fetch 2021-10-30 03:06:57 -04:00
Richard Hansen d36a37d666 PadMessageHandler: Delete unnecessary `protocolVersion`
We can assume that the client code is always in sync with what the
server expects.
2021-10-30 03:06:57 -04:00
Richard Hansen ce730b0493 PadMessageHandler: Inline `createSessionInfoAuth()`
This function is only used once so it doesn't need to be separate.
2021-10-30 03:06:57 -04:00
Richard Hansen fa54dc1053 PadMessageHandler: Run the `clientReady` hook asynchronously 2021-10-30 03:06:57 -04:00
Richard Hansen 5d30e0b1b2 PadMessageHandler: Run the `userLeave` hook asynchronously 2021-10-30 03:06:57 -04:00
Richard Hansen f2a118b311 PadMessageHandler: Inline unnecessary variables
Also delete some unneccessary comments.
2021-10-30 03:06:15 -04:00
Richard Hansen 7522d76c40 PadMessageHandler: Invert condition to improve readability 2021-10-30 03:03:19 -04:00
Richard Hansen a3b4d985ac lint: Fix awkward string formatting 2021-10-30 03:03:19 -04:00
Richard Hansen f4f3aa6aae docs: Improve `userLeave` and `clientReady` hook documentation 2021-10-30 03:03:19 -04:00
Richard Hansen 80e84636d7 pad: Promisify `handshake()` 2021-10-29 19:38:28 -04:00
Richard Hansen cd4f5ff281 pad: Defer message handling until handshake completes 2021-10-29 19:37:28 -04:00
Richard Hansen be0298290d pad: Move post-handshake code to `_afterHandshake()` 2021-10-29 19:27:33 -04:00
Richard Hansen 9fb754ce3a pad: Initialize pad cookie before starting the handshake 2021-10-29 19:27:33 -04:00
Richard Hansen f6c5ce606e pad: Move UI setup from `handshake()` to `init()` 2021-10-29 19:27:33 -04:00
Richard Hansen bd44a87388 pad: Unexport unnecessarily exported `handshake()` function 2021-10-29 19:27:33 -04:00
Richard Hansen 5cbbcbcee6 pad: Simplify reload after `.etherpad` import
The old "switch to pad" logic looked buggy, and it complicates pad
initialization. Forcing a refresh after importing an `.etherpad` file
isn't much of a UX downgrade.
2021-10-29 19:27:33 -04:00
Richard Hansen e974622561 pad: Use `window.` to avoid ESLint error 2021-10-29 19:27:33 -04:00
webzwo0i d8ca3a693d timeslider scrollTo: fixes wrong line number calculation in case there
are no attribute changes and no length changes
2021-10-29 02:38:29 -04:00
webzwo0i 9bad1d03d3 importHtml: do not add an useless identity changeset 2021-10-29 02:29:45 -04:00
webzwo0i f7f5e3dad8 setText: prevent adding useless revision in case the pad text did not
change
2021-10-29 02:29:45 -04:00
webzwo0i 63de249236 tests: do not re-add identical text with setText 2021-10-29 02:29:45 -04:00
webzwo0i 668d62fa3f importHtml: avoid race when applying empty document and the import changeset at the same time 2021-10-29 02:29:45 -04:00
snyk-bot 8eb5640cb7 fix: upgrade express-rate-limit from 5.4.0 to 5.4.1
Snyk has created this PR to upgrade express-rate-limit from 5.4.0 to 5.4.1.

See this package in npm:
https://www.npmjs.com/package/express-rate-limit

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-29 02:25:09 -04:00
snyk-bot dd8608fe6e fix: upgrade rate-limiter-flexible from 2.3.0 to 2.3.1
Snyk has created this PR to upgrade rate-limiter-flexible from 2.3.0 to 2.3.1.

See this package in npm:
https://www.npmjs.com/package/rate-limiter-flexible

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-29 02:22:24 -04:00
snyk-bot cea7eb8ba6
fix: upgrade mime-types from 2.1.32 to 2.1.33
Snyk has created this PR to upgrade mime-types from 2.1.32 to 2.1.33.

See this package in npm:
https://www.npmjs.com/package/mime-types

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-26 10:12:27 +00:00
snyk-bot 0d67d05b78 fix: upgrade express-rate-limit from 5.3.0 to 5.4.0
Snyk has created this PR to upgrade express-rate-limit from 5.3.0 to 5.4.0.

See this package in npm:
https://www.npmjs.com/package/express-rate-limit

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-25 19:10:13 -04:00
translatewiki.net 2c15ae6ac9 Localisation updates from https://translatewiki.net. 2021-10-25 13:04:22 +02:00
Richard Hansen 4a8c72a38c Changeset: Minimize changeset docs, add links to code
This reduces the amount of duplicate documentation, and helps keep the
documentation and code in sync.
2021-10-24 21:29:42 -04:00
Richard Hansen de3dfb5ce2 AttributePool: Add JSDoc comments 2021-10-24 21:18:56 -04:00
Richard Hansen c98b521539 AttributePool: Use ES6 class syntax 2021-10-24 21:18:56 -04:00
webzwo0i bbc8b29ffd Changeset: Improve JSDoc comments
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-10-24 21:18:56 -04:00
snyk-bot 2c15e68e4a
fix: upgrade clean-css from 5.2.0 to 5.2.1
Snyk has created this PR to upgrade clean-css from 5.2.0 to 5.2.1.

See this package in npm:
https://www.npmjs.com/package/clean-css

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-22 07:26:47 +00:00
snyk-bot 41e2ee4848
fix: upgrade rate-limiter-flexible from 2.2.4 to 2.3.0
Snyk has created this PR to upgrade rate-limiter-flexible from 2.2.4 to 2.3.0.

See this package in npm:
https://www.npmjs.com/package/rate-limiter-flexible

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-20 08:24:39 +00:00
snyk-bot ccd7a8d5ff fix: upgrade threads from 1.6.5 to 1.7.0
Snyk has created this PR to upgrade threads from 1.6.5 to 1.7.0.

See this package in npm:
https://www.npmjs.com/package/threads

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-17 02:32:13 -04:00
snyk-bot 1a008ed6fa
fix: upgrade clean-css from 5.1.5 to 5.2.0
Snyk has created this PR to upgrade clean-css from 5.1.5 to 5.2.0.

See this package in npm:
https://www.npmjs.com/package/clean-css

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-17 06:17:34 +00:00
Richard Hansen 4f283b64cf tests: easysync: Inline some functions that are only used once 2021-10-17 00:49:34 +02:00
Richard Hansen e535129f3c tests: easysync: Use `expect.js` for checks 2021-10-17 00:49:34 +02:00
Richard Hansen ebb7dfabd7 tests: easysync: Use mocha `describe()` and `it()` 2021-10-17 00:49:34 +02:00
Richard Hansen 2c7d0604c3 tests: easysync: Remove unnecessary `Random` class 2021-10-17 00:49:34 +02:00
Richard Hansen 8dd61f847e tests: easysync: Fix some ESLint errors 2021-10-17 00:49:34 +02:00
Richard Hansen 59a6a9f6a0 tests: easysync: Delete commented-out and unused code 2021-10-17 00:49:34 +02:00
Richard Hansen 428736cdc3 tests: easysync: Run with the frontend tests 2021-10-17 00:49:34 +02:00
snyk-bot 3722d943c7
fix: upgrade terser from 5.8.0 to 5.9.0
Snyk has created this PR to upgrade terser from 5.8.0 to 5.9.0.

See this package in npm:
https://www.npmjs.com/package/terser

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-13 07:15:16 +00:00
John McLear c47134b3ab
Update bug_report.md 2021-10-09 14:44:48 +01:00
Richard Hansen 0ea6f1518c tests: Remove overly agressive timeouts 2021-10-07 20:31:54 -04:00
Richard Hansen 3a5c44c8f7 /jserror: Enable colors to improve readability 2021-10-07 19:55:02 -04:00
Richard Hansen 629e7d5072 /jserror: Log all of the provided data 2021-10-07 19:55:01 -04:00
Richard Hansen cb01ae8cbb /jserror: Reject files 2021-10-07 19:55:01 -04:00
Richard Hansen e909072776 /jserror: Refactor to handle errors better 2021-10-07 19:55:01 -04:00
Richard Hansen 788eb86d84 Ace2Inner: Inline code that is unnecessarily inside an IIFE 2021-10-07 19:53:40 -04:00
Richard Hansen 4890cd8972 Ace2Inner: Delete completed TODO comment 2021-10-07 19:53:40 -04:00
Richard Hansen a7c78768a1 ExportHelper: Simplify `_analyzeLine()` a bit 2021-10-07 19:53:40 -04:00
Richard Hansen d8cbd134d3 PadMessageHandler: Improve readability 2021-10-07 19:53:40 -04:00
Richard Hansen 019e296c4a lint: Fix awkward string formatting 2021-10-07 19:53:40 -04:00
Richard Hansen 044f6543a5 lint: Fix ESLint errors (mostly camelcase warnings) 2021-10-07 19:53:40 -04:00
Richard Hansen 34cfff4e4c Changeset: Delete unused code 2021-10-07 19:53:40 -04:00
Richard Hansen eb495e9ea2 Changeset: Move out obsolete code 2021-10-07 19:53:40 -04:00
Richard Hansen 2155e216a6 tests: Remove overly agressive timeouts 2021-10-07 19:53:03 -04:00
translatewiki.net ac3a7191cf Localisation updates from https://translatewiki.net. 2021-10-07 13:03:04 +02:00
Richard Hansen a7734ddd94 deps: Update ueberdb2 to 1.4.18
This pulls in newer versions of some database drivers which silences
some `npm audit` security warnings.

This also adds support for PostgreSQL connection strings.
2021-10-07 03:58:35 -04:00
snyk-bot ee610027c0
fix: upgrade terser from 5.7.2 to 5.8.0
Snyk has created this PR to upgrade terser from 5.7.2 to 5.8.0.

See this package in npm:
https://www.npmjs.com/package/terser

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-05 06:23:36 +00:00
Richard Hansen e8514db365 tests: Replace manual checks with `assert` 2021-10-03 20:23:30 -04:00
Richard Hansen 72b12bc97b tests: Slight backend test reorganization
* Delete some useless uses of `describe()`
  * Combine some dependent tests
  * Rename some tests to avoid duplicate names
2021-10-03 20:06:33 -04:00
Richard Hansen dd37251da4 tests: Promisify some backend tests 2021-10-03 19:25:50 -04:00
Richard Hansen 39a971e3b9 tests: Remove overly aggressive timeouts 2021-10-03 19:25:50 -04:00
John McLear 90a2b553d1 Revert "Update README.md"
This reverts commit 1c49970fda.
2021-10-03 11:41:14 +01:00
John McLear 1c49970fda
Update README.md 2021-10-03 11:22:00 +01:00
John McLear c361df52d2 bugfix: Allow selection to start/end before line marker 2021-10-02 02:41:58 -04:00
Richard Hansen 37a33042d2 ace2_inner: Improve rep documentation 2021-10-02 02:10:07 -04:00
Richard Hansen e42e5457c1 LibreOffice: Improve logging 2021-10-01 03:01:24 -04:00
Richard Hansen 76374bc489 LibreOffice: Close stdin right away
This should prevent LibreOffice from hanging if it attempts to read
from stdin (it'll get EOF and probably exit with an error instead).
2021-10-01 03:01:24 -04:00
translatewiki.net 0c31940b09 Localisation updates from https://translatewiki.net. 2021-09-30 13:02:24 +02:00
webzwo0i 4d8ae3475d Changeset: Add documentation for `textLinesMutator()` 2021-09-30 12:29:24 +02:00
webzwo0i 0de41ee087 adminsettings test: Fix save detection race condition
Use MutationObserver to detect if a saveProgress event was received,
which will trigger an animation.

Before this, `helper.admin$('#response').is(':visible')` was true
after the page loaded and before clicking the Save button, so there
was a possibility that after clicking Save, but before sending the
socketio message to the server, the visibility is checked and returns
true, so the page gets reloaded before the changed settings have been
saved.
2021-09-29 23:49:16 -04:00
webzwo0i bb0ca91dc2 adminupdateplugins test: swap assertions, increase timeout 2021-09-29 23:49:16 -04:00
webzwo0i d3890bc2c2 admin tests: Increase `maxHttpBufferSize` to fit `settings.json` 2021-09-29 23:48:03 -04:00
webzwo0i 91d3974a0d adminsettings test: Be a little stricter for some assertions 2021-09-29 23:46:25 -04:00
webzwo0i cc6fda6916 adminsettings test: Fix restart detection
We cannot guarantee that the system time on SauceLabs and Github is in
sync. In case the SauceLabs runner's clock is slow the test would have
failed.
2021-09-29 23:42:41 -04:00
Hossein d262e31bbf fix: install all dependencies and symlink 2021-09-28 19:01:19 -04:00
Hossein 0e311184cf fix: change directory to etherpad root 2021-09-28 19:01:19 -04:00
Richard Hansen aec619cc0b log4js: Deprecate the `logconfig` setting
This will make it possible to upgrade log4js in a future version.
2021-09-28 04:30:26 -04:00
Richard Hansen b3b6c94b76 log4js: Initialize as early as possible 2021-09-28 04:30:26 -04:00
Richard Hansen 7653dc650d settings: Use a log4js logger instead of `console` 2021-09-28 04:30:26 -04:00
Richard Hansen 653dbb3449 tests: Wait for pad init before returning from `helper.aNewPad()`
This should make it easier to avoid race conditions.
2021-09-28 04:18:24 -04:00
Richard Hansen 4d2839457a CSS: Fix underscore and clear authorship icon alignment 2021-09-26 12:07:56 +02:00
snyk-bot 4637b2b729
fix: upgrade js-cookie from 3.0.0 to 3.0.1
Snyk has created this PR to upgrade js-cookie from 3.0.0 to 3.0.1.

See this package in npm:
https://www.npmjs.com/package/js-cookie

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-09-23 08:10:28 +00:00
JustAnotherArchivist fe7d223b6e Docker: Expose socketIo.maxHttpBufferSize and dumpOnUncleanExit settings as environment variables 2021-09-16 19:14:36 +00:00
Richard Hansen 15f17b5237 tests: Avoid deprecated `Builder.withCapabilities()` method 2021-09-15 19:42:11 -04:00
Richard Hansen 73cb698ba0 tests: Update selenium-webdriver to 4.0.0-rc-1 2021-09-15 19:40:47 -04:00
Richard Hansen 70c16bb1b5 tests: Check import of export of read-only pad ID 2021-09-15 18:32:06 -04:00
John McLear b683dc300d tests: Check for leak of read-write pad ID when exporting 2021-09-15 18:32:06 -04:00
Richard Hansen 0f5a4bd1f8 tests: Restructure read-only pad export tests
This also adds coverage for `.etherpad` exports.
2021-09-15 18:32:06 -04:00
webzwo0i dbd76f0c5d export: Don't leak writeable pad ID when exporting
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-09-15 18:32:06 -04:00
webzwo0i 58bd96ce8f padreadonly: Remove dead `/ro/:id` handling
Read-only pads are accessed using `/p/` path since commit
ba3430ebb7.
2021-09-14 17:07:55 -04:00
translatewiki.net d58b649c76 Localisation updates from https://translatewiki.net. 2021-09-09 13:02:49 +02:00
Richard Hansen 03275ba227 deps: Regenerate `src/package-lock.json` 2021-09-06 14:47:11 -04:00
Richard Hansen 59ebaa78fd deps: Update `src/package.json` versions to match lock file 2021-09-06 14:47:11 -04:00
Richard Hansen ebe05f8e63 deps: Delete unused `async-stacktrace` dependency 2021-09-06 14:47:11 -04:00
Richard Hansen bc9cdd6957 SocketIORouter: Add acknowledgement support 2021-09-06 14:45:26 -04:00
Richard Hansen 9f9adb369b SocketIORouter: Don't crash if message handler throws 2021-09-06 14:45:26 -04:00
Richard Hansen 320e5c1109 SocketIORouter: Add unit tests 2021-09-06 14:45:26 -04:00
Richard Hansen 94f71bd5e9 SocketIORouter: Add ability to unregister handler
This will make it easier to add tests.
2021-09-06 14:45:26 -04:00
Richard Hansen 2e93fca699 SocketIORouter: Logging improvements 2021-09-06 14:45:26 -04:00
Richard Hansen b9609a749d SocketIORouter: Rename variables to improve readability 2021-09-06 14:45:26 -04:00
Richard Hansen 4a09000ca6 installDeps.sh: Don't nuke `src/node_modules` on error
Rationale:
  * Clearing out `src/node_modules` is unlikely to bring future
    success.
  * If there is an error, it's better to leave the filesystem alone so
    that the user can investigate the cause.
  * Deleting the directory on error is a surprising behavior.
2021-09-05 19:42:29 -04:00
Richard Hansen 2ba85dba0e installDeps.sh: Handle errors 2021-09-05 19:36:05 -04:00
Richard Hansen 258b8366e2 installDeps.sh: Ensure that `ep_etherpad-lite` is a directory 2021-09-05 19:31:06 -04:00
Richard Hansen cf7cf8be69 installDeps.sh: Quote underquoted expansions 2021-09-05 19:28:58 -04:00
Richard Hansen 8b89cb3f6f installDeps.sh: Wrap long lines 2021-09-05 19:24:17 -04:00
Richard Hansen 42e59ff2cd installDeps.sh: Simplify log message 2021-09-05 19:23:01 -04:00
Myzel394 15964345f7 fixed typo 2021-08-31 16:00:12 +01:00
Richard Hansen 348bc0c269 tests: Delete overly aggressive timeouts
See https://github.com/ether/etherpad-lite/issues/4988 for rationale.
2021-08-30 02:02:37 -04:00
Richard Hansen 67dfb64095 deps: Bump ueberdb2 to 1.4.15 2021-08-30 01:49:02 -04:00
Richard Hansen 942b686f2d deps: Bump npm to 6.14.15 2021-08-30 01:22:44 -04:00
Richard Hansen 1e20936b5b deps: Bump terser to 5.7.2 2021-08-29 23:37:06 -04:00
Richard Hansen f5657510be deps: Bump supertest to 6.1.6 2021-08-29 23:37:06 -04:00
Richard Hansen 327989ef0b deps: Bump superagent to 6.1.0 2021-08-29 23:37:06 -04:00
Richard Hansen 96e66aab17 deps: Bump sinon to 11.1.2 2021-08-29 23:37:06 -04:00
Richard Hansen c33a2682f9 deps: Bump semver to 7.3.5 2021-08-29 23:37:06 -04:00
Richard Hansen 550c7365c2 deps: Bump openapi-backend to 4.2.0 2021-08-29 23:37:06 -04:00
Richard Hansen 529d2f6b7d deps: Bump rehype to 10.0.0 2021-08-29 23:37:06 -04:00
Richard Hansen 0accdf0a07 deps: Bump mocha to 9.1.1 2021-08-29 23:37:06 -04:00
Richard Hansen 72b22f7c02 deps: Bump measured-core to 2.0.0 2021-08-29 23:37:06 -04:00
Richard Hansen 7db3e4273d deps: Bump jsdom to 17.0.0 2021-08-29 23:37:06 -04:00
Richard Hansen 7dbd278d1d deps: Bump js-cookie to 3.0.0 2021-08-29 23:36:48 -04:00
Richard Hansen ea43c92fe9 deps: Bump etherpad-cli-client to 0.1.12 2021-08-29 20:02:54 -04:00
Richard Hansen 912e72a8ac deps: Bump clean-css to 5.1.5 2021-08-29 19:33:03 -04:00
Richard Hansen 3225abc3c7 deps: Bump eslint to 7.32.0 2021-08-29 19:23:43 -04:00
snyk-bot cca3ba94f9
fix: upgrade async from 3.2.0 to 3.2.1
Snyk has created this PR to upgrade async from 3.2.0 to 3.2.1.

See this package in npm:
https://www.npmjs.com/package/async

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-08-27 07:05:25 +00:00
snyk-bot 3c159ef75e fix: upgrade wtfnode from 0.9.0 to 0.9.1
Snyk has created this PR to upgrade wtfnode from 0.9.0 to 0.9.1.

See this package in npm:
https://www.npmjs.com/package/wtfnode

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-08-25 20:34:55 -04:00
Richard Hansen 0d65dc8a44 pad: Add `clientVars` to `postAceInit` hook context
This allows plugins to avoid the `clientVars` global variable.
2021-08-25 14:59:17 -04:00
translatewiki.net b683cdfe0f Localisation updates from https://translatewiki.net. 2021-08-23 13:03:03 +02:00
snyk-bot f08a443497 fix: upgrade rate-limiter-flexible from 2.2.3 to 2.2.4
Snyk has created this PR to upgrade rate-limiter-flexible from 2.2.3 to 2.2.4.

See this package in npm:
https://www.npmjs.com/package/rate-limiter-flexible

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-08-19 20:46:38 -04:00
snyk-bot 05182d1d30
fix: upgrade mime-types from 2.1.31 to 2.1.32
Snyk has created this PR to upgrade mime-types from 2.1.31 to 2.1.32.

See this package in npm:
https://www.npmjs.com/package/mime-types

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-08-19 07:35:17 +00:00
Richard Hansen fed950e809 ace2_inner: Simplify handler for Ctrl-@ (show authors) 2021-08-16 00:34:30 -04:00
Richard Hansen 88057eade2 ace2_inner: Readability improvements 2021-08-16 00:34:30 -04:00
Richard Hansen bc6428025a ace2_inner: Use for..of iteration to improve readability 2021-08-16 00:34:30 -04:00
Richard Hansen f06307cb4c ace2_inner: Fix for..in iteration
See commit c38c34bef4.
2021-08-16 00:34:30 -04:00
Richard Hansen 2d50a8aa95 ace2_inner: Fix efficiency of `rangeForLine()`
Returning `true` or `false` has no effect when iterating using
`Array.prototype.forEach`. This fixes a bug introduced in commit
b28bfe8e31.
2021-08-16 00:34:30 -04:00
Richard Hansen ca2e008e7b ace2_inner: Move variable declarations to appropriate scope 2021-08-16 00:34:30 -04:00
Richard Hansen bf10e70f2e ace2_inner: Delete unnecessary `currentLine` variable 2021-08-16 00:34:30 -04:00
Richard Hansen 9fc613d362 ace2_inner: Delete unnecessary checks 2021-08-16 00:34:30 -04:00
Richard Hansen a5f9c60a34 ace2_inner: Operate on Elements, not Nodes 2021-08-16 00:34:30 -04:00
Richard Hansen aad75e4661 ace2_inner: Factor out duplicate line number div creation 2021-08-16 00:34:30 -04:00
Richard Hansen 3237f8d123 ace2_inner: Simplify iteration over line number divs 2021-08-16 00:34:30 -04:00
Richard Hansen b238d9610a ace2_inner: Factor out duplicate line height application 2021-08-16 00:34:30 -04:00
Richard Hansen 1b890e3d4d ace2_inner: Replace `lineNumbersShown` with number of children 2021-08-16 00:34:30 -04:00
Richard Hansen 27363bf729 ace2_inner: Add line number divs directly, not via fragment
There's no layout thrashing so the fragment doesn't provide any
benefit.
2021-08-16 00:34:30 -04:00
Richard Hansen e1a024847c ace2_inner: Delete unnecessary `innerdocbody` variable 2021-08-16 00:34:30 -04:00
Richard Hansen 7d807d2fc5 ace2_inner: Delete unnecessary `container` variable 2021-08-16 00:34:30 -04:00
Richard Hansen 4b4584c264 ace2_inner: Delete unnecessary `doc` and `root` variables 2021-08-16 00:34:25 -04:00
Richard Hansen ec63c15a40 ace2_inner: Simplify document body selection 2021-08-16 00:31:09 -04:00
Richard Hansen 11c86e677a ace2_inner: Consistently use `outerWin` and `outerDoc` 2021-08-16 00:31:09 -04:00
Richard Hansen 98c1ba5808 ace2_inner: Use destructuring assignment to simplify 2021-08-16 00:31:09 -04:00
Richard Hansen c7be4f9d2d ace2_inner: Move `sidedivinner` creation to ace.js 2021-08-16 00:31:09 -04:00
Richard Hansen 15b1d4cb75 ace2_inner: Build `sidedivinner` programmatically 2021-08-16 00:31:09 -04:00
Richard Hansen b80295c228 ace2_inner: Combine declaration and initialization 2021-08-16 00:31:09 -04:00
Richard Hansen 7a8edc816b ace2_inner: Replace `initLineNumbers()` with an IIFE 2021-08-16 00:31:09 -04:00
Richard Hansen b5bfff43cf ace2_inner: Delete redundant class assignment 2021-08-16 00:31:08 -04:00
Richard Hansen e581ee01f2 ace2_inner: Formatting improvements 2021-08-16 00:30:50 -04:00
Richard Hansen 0ca5a3459f Timeslider: Install an error handler 2021-08-14 07:44:05 -04:00
Richard Hansen 1e22e0102d Timeslider: Move `<title>` and `<script>` inside `<head>` 2021-08-14 07:44:05 -04:00
Richard Hansen b6fba9d66d Pad: Improve page load error handler
* Install the error handler early.
  * Include stack trace.
  * Remove unnecessary escaping.
  * Improve formatting.
  * Move to a separate script file.
2021-08-14 07:44:05 -04:00
Richard Hansen d4e74fd038 Pad: Add missing `<head>` and `<body>` tags
The comment "head and body had been removed intentionally" implies
that the tags were causing some sort of problem, but the commit that
removed them (57075d1545) didn't provide
any rationale. I'm assuming it was a mistake.
2021-08-14 07:44:05 -04:00
Richard Hansen 4a1f21ce34 pad_editbar: Convert snake case to camel case 2021-08-14 07:26:31 -04:00
Richard Hansen 5478d2ce60 pad_editbar: Use ES6 class syntax for readability 2021-08-14 07:26:31 -04:00
Richard Hansen 97ccf9e082 pad_editbar: Factor out duplicate code 2021-08-14 07:08:57 -04:00
Richard Hansen ee41de4809 pad_editbar: Deprecate the `toggleDropDown` callback 2021-08-14 07:08:57 -04:00
Richard Hansen c629ee09a8 pad_editbar: Call the callback asynchronously
This follows JavaScript best practices.
2021-08-14 07:08:57 -04:00
Richard Hansen 148e10821b pad_editbar: Always call the callback 2021-08-14 07:08:57 -04:00
Richard Hansen 07e05a92eb pad_editbar: Call the callback after all work is done 2021-08-14 07:08:57 -04:00
Richard Hansen a1b924f746 pad_editbar: Don't pass a callback to `toggleDropDown()`
The function is synchronous so there's no point.
2021-08-14 07:08:57 -04:00
Richard Hansen 59d6a8b321 pad_editbar: Delete unnecessary `returned` variable 2021-08-14 07:01:50 -04:00
Richard Hansen a4652d67a0 pad_editbar: Move `commands` up for readability 2021-08-14 07:01:50 -04:00
Richard Hansen fda34407f9 pad_editbar: Move `dropdowns` initialization to constructor
This avoids null dereference if a buggy caller calls
`toggleDropDown('none')` before `init()`. (Ideally the caller would be
fixed, but this is not always feasible.)
2021-08-14 07:01:34 -04:00
Richard Hansen 42b0b1bf00 pad_editbar: Move `syncAnimation` out of `padeditbar` IIFE
This avoids the need for an IIFE.
2021-08-14 07:01:13 -04:00
Richard Hansen ee996f530f pad_editbar: Remove unnecessary `syncAnimationFn` variable 2021-08-14 07:01:13 -04:00
Richard Hansen 4b4eef5f4a pad_editbar: Convert `registerDefaultCommands()` into a method 2021-08-14 07:01:13 -04:00
Richard Hansen 0d4f147349 pad_editbar: Simplify iteration 2021-08-14 07:01:13 -04:00
Richard Hansen 11faf6104a pad_editbar: Convert `bodyKeyEvent()` into a method 2021-08-14 07:01:13 -04:00
Richard Hansen b2fe6e3e7e pad_editbar: Fix invalid use of `this` 2021-08-14 07:01:12 -04:00
Richard Hansen b884628a5a pad_editbar: Use arrow functions for callbacks, IIFEs 2021-08-14 07:01:12 -04:00
Richard Hansen bdaa66c346 pad_editbar: Use `this` instead of `self` 2021-08-14 07:01:12 -04:00
Richard Hansen 118c66e5d0 HTML import: Improve log message for invalid HTML 2021-08-12 13:53:23 -04:00
Richard Hansen c816c20bc7 HTML import: Replace cheerio with jsdom to simplify contentcollector
Cheerio provides jQuery-like objects but they wrap DOM Node-like
objects that are not 100% API compatible with the DOM spec. Because of
this, contentcollector, which is used in browsers and in Node.js
during HTML import, has until now needed to support two different
APIs. This commit modifies HTML import to use jsdom instead of cheerio
and simplifies contentcollector.
2021-08-12 13:53:23 -04:00
Volker Bijewitz 84d6d277d7 Accessibility fix for JAWS screen readers
ace.js: removed the role 'application' from innerDocument.body. JAWS
do not read any text from the edit lines if this role is set.

domline.createDomLine: to give JAWS the ability to read the lines
correctly, it is required to set the attribute 'aria-live' to
'assertive'.
2021-08-12 13:48:08 -04:00
Richard Hansen 15995acc2a deps: Bump require-kernel and yajsml
This brings improvements to the readability of stack traces,
especially in Firefox.
2021-08-09 19:04:42 -04:00
translatewiki.net 9eadd9988f Localisation updates from https://translatewiki.net. 2021-08-09 13:03:33 +02:00
snyk-bot 33a43b7082 fix: upgrade rate-limiter-flexible from 2.2.2 to 2.2.3
Snyk has created this PR to upgrade rate-limiter-flexible from 2.2.2 to 2.2.3.

See this package in npm:
https://www.npmjs.com/package/rate-limiter-flexible

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-08-02 20:43:44 -04:00
translatewiki.net fd4fb8874e Localisation updates from https://translatewiki.net. 2021-08-02 13:02:54 +02:00
webzwo0i e61888dfe2 ace.js: Don't use srcdoc when creating iframes (see #4975)
Using srcdoc, especially with multiple nested iframes, seems to be
problematic when using `self` in CSP policies.
2021-07-30 03:51:57 -04:00
Richard Hansen 9fda5adcef ace2_inner.js: Improve discovery of `sidediv` and `linemetricsdiv`
The `Node.nextSibling` property returns the next Node, not the next
Element. If whitespace, an HTML comment, or any other type of
non-Element Node is ever introduced between the Elements then
`.nextSibling` no longer returns the desired Element. Switching to
`Element.nextElementSibling` would work, but finding the Elements by
ID is more readable and future-proof.
2021-07-30 03:51:56 -04:00
Richard Hansen 0c963a817a ace2_inner.js: Delete unnecessary `ace_outerWin` variable 2021-07-30 03:51:56 -04:00
Richard Hansen 8d869ec927 Pad: Delete non-functional debug logging facility 2021-07-30 03:50:23 -04:00
Richard Hansen 5d39a57507 Pad: Delete dead `ace_getFormattedCode()` 2021-07-30 03:49:35 -04:00
Richard Hansen 1db509ba23 Docker: Add `dbSettings.collection` and `.url` settings
These are used by the `mongodb` driver.
2021-07-30 03:48:36 -04:00
Richard Hansen c3af70e5a5 deps: Bump ueberdb2 to 1.4.13 2021-07-30 03:48:36 -04:00
translatewiki.net 2dbcd00dc6 Localisation updates from https://translatewiki.net. 2021-07-29 13:03:26 +02:00
translatewiki.net a9c6ed8701 Localisation updates from https://translatewiki.net. 2021-07-26 13:03:49 +02:00
Richard Hansen d723270388 tests: Improve readability of `multipleUsers.js`
* Define utility functions above their use to silence lint warnings.
  * Use `.css()` instead of `.attr('style')` to manipulate style.
  * Pass an object to `.attr()` rather than call once per attribute.
  * Take advantage of chaining.
  * Inline unnecessary `padUrl` variable.
  * Delete some unnecessary comments.
2021-07-25 02:23:50 +02:00
Richard Hansen ff39eeafca tests: Factor out duplicate `getFrameJQuery()` 2021-07-25 02:23:50 +02:00
Richard Hansen 42026ff771 tests: Add a comment explaining why `Promise.all()` is not used 2021-07-25 02:23:50 +02:00
Richard Hansen 01184cd1aa tests: Remove unnecessary `includeJquery` parameter 2021-07-25 02:23:50 +02:00
Stefan Müller ed6fa9400a Add healthcheck to Dockerfile 2021-07-23 20:14:42 -04:00
snyk-bot 4a670e96ab
fix: upgrade express-rate-limit from 5.2.6 to 5.3.0
Snyk has created this PR to upgrade express-rate-limit from 5.2.6 to 5.3.0.

See this package in npm:
https://www.npmjs.com/package/express-rate-limit

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-07-23 04:22:23 +00:00
Richard Hansen c83bb058d1 PadMessageHandler: Fix stats null dereference
It is possible for the stats to be read before the
`expressCreateServer` hook is called (in particular: when there is an
error during startup), which is when the `socketio` variable is set.
Check for non-null `socketio` before attempting to count the number of
socket.io connections.
2021-07-22 13:07:03 -04:00
translatewiki.net 3d80409236 Localisation updates from https://translatewiki.net. 2021-07-22 13:03:00 +02:00
webzwo0i 62093adce5 tests: refactor inclusion of jquery and sendkeys via script tags
Readability is increased by explicitly checking if jquery/sendkeys was
already loaded before evaluating it in the context of ace_inner and the
enclosing container (pad.html). Note that sendkeys is no longer
evaluated in the context of ace_outer, as this isn't needed

Also removes some IE 8/9 legacy code
2021-07-21 01:53:05 +02:00
Richard Hansen 4ceb3ca4c8 Chat: Allow Shift-Enter to insert a newline 2021-07-19 23:44:33 +02:00
Richard Hansen cf86ae8b63 Chat: Use `KeyboardEvent.key` instead of deprecated `.which` 2021-07-19 23:44:33 +02:00
Richard Hansen faf84f0143 Chat: Display whitespace in chat messages 2021-07-19 23:44:33 +02:00
Richard Hansen 834e05fc9c Chat: Use a `<textarea>` for message input 2021-07-19 23:44:33 +02:00
Richard Hansen ce5ef9350f tests: sendkeys: Fix `{enter}` keypress event 2021-07-19 23:44:33 +02:00
translatewiki.net c6f643dd75 Localisation updates from https://translatewiki.net. 2021-07-19 13:02:46 +02:00
Xavier Mehrenberger ca4cc2d7c0 Fix settings.useMonospaceFontGlobal
When settings.useMonospaceFontGlobal is set to `true`, it sets the default
font to 'monospace'. This font seems to have been removed in
a5164dad43.

This commit sets the default font to "RobotoMono" which is a valid
option.

Tested in a Docker environment, setting `PAD_OPTIONS_USE_MONOSPACE_FONT`
to `true`

Signed-off-by: Xavier Mehrenberger <xavier.mehrenberger@gmail.com>
2021-07-14 04:33:38 -04:00
Richard Hansen 336d48add7 Add support for square brackets in URLs
This reverts commit 9022877cc6.
2021-07-10 22:22:31 -04:00
Richard Hansen 09f8ffbdb6 deps: Bump ueberdb2 to 1.4.11 2021-07-10 18:26:31 -04:00
Richard Hansen 5f39a1ee7f CSS: Underline links in error dialogs
Underlining was removed for unknown reasons by commit
d872b42e31.
2021-07-09 18:43:13 -04:00
webzwo0i bb3bb2c12a Merge branch 'master' into develop 2021-07-04 07:05:36 +02:00
webzwo0i 571b37b772 Merge branch 'develop' 2021-07-04 07:05:35 +02:00
webzwo0i a634bd8ee1 bump version 2021-07-04 07:05:34 +02:00
webzwo0i f55ccd2cdd changelog 1.8.14 2021-07-04 07:01:07 +02:00
jon r bb7ece7d7e doc/docker.md - add sqlite to DB_FILENAME
The configuration option `DB_FILENAME` is also used in conjunction with the `sqlite` ueberdb2 adapter.
2021-07-02 16:39:17 -04:00
webzwo0i b475296cee stop closing feature requests by stale bot 2021-07-02 14:07:29 -04:00
translatewiki.net 197e04ecd7 Localisation updates from https://translatewiki.net. 2021-07-01 13:42:31 +02:00
Richard Hansen 3d40ab7e8c CSS: Move author color padding to `setAuthorStyle()`
This prevents the padding from clashing with plugins that use the
`aceSetAuthorStyle` hook.
2021-06-22 14:43:22 -04:00
translatewiki.net 2745557127 Localisation updates from https://translatewiki.net. 2021-06-21 12:28:27 +02:00
Richard Hansen f8a9cd4bad docs: Revise `clientVars` documentation 2021-06-18 22:22:56 -04:00
Richard Hansen 2e2cb38225 Docker: Install `git` and `ca-certificates` packages
This makes it possible to install plugins from Git repositories.
2021-06-18 17:50:44 -04:00
Richard Hansen 2a367f6171 Docker: Pass `--no-install-recommends` to `apt-get intall` 2021-06-18 17:50:44 -04:00
Richard Hansen d4e201b1b0 Docker: Set `DEBIAN_FRONTEND=noninteractive` when running `apt-get` 2021-06-18 17:50:44 -04:00
Richard Hansen e108161f60 Docker: Use `apt-get` instead of `apt`
This silences the following warning:

> WARNING: apt does not have a stable CLI interface. Use with caution
> in scripts.
2021-06-18 17:50:44 -04:00
Richard Hansen b9e495e228 Docker: Combine `abiword` and `libreoffice` install steps
This avoids multiple `apt update` runs if both are to be installed,
and it will make it easier to add more packages in the future.
2021-06-18 17:50:44 -04:00
Richard Hansen e9785f37ee Docker: Install plugins before core deps 2021-06-18 17:50:44 -04:00
Richard Hansen 5946244bef Docker: Nuke all of `~/.npm` after installing packages 2021-06-18 17:50:44 -04:00
Richard Hansen aeb56dd594 Docker: Don't create `package-lock.json` when installing plugins 2021-06-18 17:50:44 -04:00
Richard Hansen 9fcd86b3cd Pad: Fix `<script>` elements in `aceInitInnerdocbodyHead` hook
Using `.innerHTML` to create a `<script>` element does create a DOM
node, but the script is not actually executed. Fortunately, creating a
DocumentFragment does cause the script to execute.
2021-06-18 17:50:15 -04:00
Richard Hansen 7bdd0f2f09 bin/updatePlugins.sh: Many refinements
* cd to top-level Etherpad directory is now more robust.
  * Only attempt to update packages whose names begin with `ep_`.
  * Don't create `package-lock.json`.
  * Improve logging.
  * Improve error handling.
2021-06-18 04:34:37 -04:00
Richard Hansen 4b3e47bd23 bin/importSqlFile.js: Read the file one line at a time
This avoids running out of memory if the file is large.
2021-06-17 19:45:17 -04:00
webzwo0i 485538bd79 bump wtfnode to fix #5078 2021-06-17 06:14:45 +02:00
Richard Hansen 251cc7ab32 CSS: Fix button icon centering 2021-06-16 18:27:52 -04:00
Richard Hansen 53cca5a743 PadMessageHandler: Also send `USER_NEWINFO` messages on reconnect
Now the user list is correct after a reconnect. This also allows
ep_webrtc to automatically recover after a temporary network glitch.
2021-06-16 01:35:25 -04:00
Richard Hansen 7ca336c28e lint: Update eslint-config-etherpad and friends 2021-06-14 23:17:17 +02:00
Richard Hansen 44343e5c5e tests: Replace Node.js v15 with v16 2021-06-14 23:17:17 +02:00
Richard Hansen ef1ba21104 deps: Drop support for Node.js < 12.13.0 2021-06-14 23:17:17 +02:00
webzwo0i 66ee9c5ef9 update package-lock 2021-06-14 13:21:48 -04:00
Richard Hansen 5dcb7a7549 tests: Don't attempt to wrap non-functions 2021-06-14 13:45:13 +02:00
Richard Hansen 081b97c41d tests: Wrap more Mocha functions 2021-06-14 13:45:13 +02:00
Richard Hansen 3e4df68510 tests: Enable fake webcam on Microsoft Edge 2021-06-10 15:36:35 -04:00
Richard Hansen 565b1c5271 tests: Fix flexbox grow/shrink factors
* Make sure the `#mocha-report` div grows to fill the available
    vertical space.
  * Prevent the "Loading frontend test specs..." div from shrinking.
2021-06-10 13:28:55 -04:00
Richard Hansen acd11c3948 tests: Fetch frontend test specs in parallel 2021-06-09 20:28:03 -04:00
Richard Hansen 36d2af5318 tests: Display frontend spec loading progress 2021-06-09 20:18:22 -04:00
Richard Hansen e0ae997501 tests: Don't auto-scroll Mocha results if user scrolls up 2021-06-09 18:48:31 -04:00
Richard Hansen f5046f4b18 tests: Keep the `#mocha-stats` div visible 2021-06-09 18:48:31 -04:00
snyk-bot ea4500ef64
fix: upgrade express-session from 1.17.1 to 1.17.2
Snyk has created this PR to upgrade express-session from 1.17.1 to 1.17.2.

See this package in npm:
https://www.npmjs.com/package/express-session

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-06-09 22:13:02 +00:00
translatewiki.net 28f2acf98a Localisation updates from https://translatewiki.net. 2021-06-07 14:48:08 +02:00
Richard Hansen cccabf45b8 pad: Move error message to the top of the gritter box 2021-06-06 21:31:49 -04:00
Richard Hansen b2e94685fb pad: Display error name in the gritter box 2021-06-06 21:31:40 -04:00
Richard Hansen 63a5dc6599 tests: Configure Firefox to use fake webcam
This makes it possible to test ep_webrtc in Firefox.
2021-06-06 16:53:51 -04:00
Richard Hansen 8f0d70312d tests: Also pass `--use-fake-ui-for-media-stream` to Chrome
For testing ep_webrtc.
2021-06-06 16:25:27 -04:00
Richard Hansen 752e2488af tests: Migrate from `wd` to `selenium-webdriver` 2021-06-06 16:23:56 -04:00
Richard Hansen 1756415495 tests: Avoid jQuery when reading Mocha output 2021-06-06 16:20:13 -04:00
Richard Hansen 6c2f31a5cb tests: Add tests for `settings.json` parsing 2021-06-06 14:00:52 -04:00
Richard Hansen de0a450aec Docker: If `DB_*` env var is unset, remove the corresponding setting 2021-06-06 14:00:52 -04:00
Richard Hansen 428f8d1684 Settings: Deprecate null as the default default value 2021-06-06 14:00:52 -04:00
Richard Hansen aa221698c8 Docker: Explicitly default env var substitutions to null 2021-06-06 14:00:52 -04:00
Richard Hansen c7bb18c6da Settings: Support null and undefined env var substitutions 2021-06-06 14:00:51 -04:00
Richard Hansen 299dbbe7e6 tests: Move split-grid to dev dependencies
This is only used for testing.
2021-06-06 06:45:00 -04:00
Richard Hansen 45ca82fd9f tests: Make the Mocha results area resizable 2021-06-05 03:51:55 -04:00
Richard Hansen c4239b6059 tests: Show a scrollbar if the pad is too wide 2021-06-05 03:51:11 -04:00
Richard Hansen fc3b811726 tests: Move iframe min width to iframe selector 2021-06-05 03:51:11 -04:00
Richard Hansen 960c2c0c0d tests: Tweak mocha report spacing 2021-06-05 03:51:11 -04:00
Richard Hansen b09b895ac7 tests: Remove border around iframe 2021-06-05 03:51:11 -04:00
Richard Hansen e9f08bdd11 tests: Fix frontend test CSS selectors 2021-06-05 03:51:11 -04:00
Richard Hansen 76634eb6ff tests: Add missing `<head>` and `<body>` tags 2021-06-05 03:51:11 -04:00
Richard Hansen d9782ac628 tests: Send frontend test spec list as JSON 2021-06-05 03:51:06 -04:00
Richard Hansen 20df34bb67 tests: Promisify `helper.init()` 2021-06-05 03:50:36 -04:00
Richard Hansen c714ff1014 tests: Let Express handle errors when serving `frontendTestSpecs.js`
Express v4.x doesn't understand Promises so we have to manually catch
Promise rejections and pass the error object to `next()`.
2021-06-05 03:50:36 -04:00
Richard Hansen e4f011df76 tests: Use `require()` to load frontend test specs
This makes core and plugin tests consistent with each other, makes it
possible to `require()` relative paths in spec files, simplifies the
code somewhat, and should make it easier to move away from
require-kernel.

Also:
  * Wrap plugin tests inside a `describe()` that contains the plugin
    name to make it easier to grep for a plugin's tests and for
    consistency with core tests.
  * Add "<core>" to the core test descriptions to make it easier to
    distinguish them from plugin tests.
2021-06-05 03:50:26 -04:00
Richard Hansen d8eb79428f tests: Recurse under frontend spec dir 2021-06-05 03:49:13 -04:00
Richard Hansen 5d54c1657a tests: Redirect `/tests/frontend/index.html` to `/tests/frontend/` 2021-06-05 03:49:12 -04:00
Richard Hansen 712b8c5769 tests: Redirect `/tests/frontend` to `/tests/frontend/` 2021-06-05 03:49:12 -04:00
Richard Hansen 573da027e5 tests: Preserve query string when redirecting 2021-06-05 03:49:12 -04:00
Richard Hansen 9cba96e5e9 tests: Use relative paths for scripts 2021-06-05 03:49:12 -04:00
Richard Hansen e144434571 tests: Use relative paths in `helper.init()`
This avoids problems if Etherpad is served under a path like
`/etherpad`.
2021-06-05 03:49:12 -04:00
Richard Hansen dfd649dbe9 tests: Use a relative redirect for `/tests/frontend`
This avoids problems if Etherpad is served under a path like
`/etherpad`.
2021-06-03 15:10:23 -04:00
Richard Hansen 617267ce71 tests: Use `plugin_defs` to get plugin frontend test spec paths 2021-06-03 15:10:23 -04:00
Richard Hansen 1b7b96f57e tests: Avoid deprecated `fs.existsSync()` 2021-06-03 15:10:23 -04:00
Richard Hansen ab824c728f tests: Move slashes to improve readability 2021-06-03 15:10:22 -04:00
Richard Hansen 1516bf473f tests: Delete unnecessary `staticDir` variable 2021-06-03 15:10:22 -04:00
Richard Hansen d69345bb4e tests: Use map+reduce to improve readability 2021-06-03 15:10:22 -04:00
Richard Hansen a8e77126e8 tests: Combine `.map().filter().map()` into single `.map()` 2021-06-03 15:10:22 -04:00
Richard Hansen 2414203434 tests: Remove unnecessary `return` 2021-06-03 15:10:22 -04:00
Richard Hansen 0852df74f1 tests: Unexport unnecessarily exported functions 2021-06-03 15:10:22 -04:00
Richard Hansen ed44449639 tests: Pretty-print `frontendTestSpecs.js` to make troubleshooting easier 2021-06-03 15:10:22 -04:00
Richard Hansen 4fa9f9e9d8 tests: Use `window.foo` instead of `var foo` 2021-06-03 15:10:22 -04:00
Richard Hansen aea2fb7448 tests: Rename `specs_list` to `frontendTestSpecs` 2021-06-03 15:10:22 -04:00
Richard Hansen 1be1b704f1 tests: Simplify iteration over frontend test specs 2021-06-03 15:10:22 -04:00
Richard Hansen b85a040f13 tests: Reuse `sanitizePathname` when serving frontend specs 2021-06-03 15:10:22 -04:00
Richard Hansen ade17490e0 tests: Combine frontend test file handlers 2021-06-03 15:10:22 -04:00
Richard Hansen 995e381243 tests: Only wrap `*.js` files in `describe()` 2021-06-03 15:10:22 -04:00
Richard Hansen e1c2c963f0 tests: URL decode test spec pathnames
Express automatically URL decodes route parameters.
2021-06-03 15:10:22 -04:00
Richard Hansen 998e77ec25 tests: Switch to promisified `readFile` 2021-06-03 15:10:22 -04:00
Richard Hansen 6cf27a7133 tests: Use `fs.promises` instead of wrapping with `util.promisify` 2021-06-03 15:10:22 -04:00
Richard Hansen f00f9aa14c tests: Avoid `.then()` inside `async` functions 2021-06-03 15:10:22 -04:00
Richard Hansen d87b4e0c20 tests: Use `async`/`await` instead of returning Promises
This makes stack traces more useful.
2021-06-03 15:10:21 -04:00
Richard Hansen 0d9476529e sanitizePathname: Move to separate module to facilitate reuse 2021-06-03 15:10:21 -04:00
Richard Hansen 926da57e34 Minify: Refine `sanitizePathname` to avoid pathname traversal 2021-06-03 15:10:21 -04:00
translatewiki.net 3bca85286b Localisation updates from https://translatewiki.net. 2021-06-03 15:12:59 +02:00
translatewiki.net 8f63671ea9 Localisation updates from https://translatewiki.net. 2021-05-31 10:02:43 +02:00
translatewiki.net a04089636c Localisation updates from https://translatewiki.net. 2021-05-27 15:37:31 +02:00
translatewiki.net c426e939d1 Localisation updates from https://translatewiki.net. 2021-05-24 14:00:35 +02:00
Richard Hansen 6f2f20233f lint: Fix straightforward ESLint errors 2021-05-12 11:26:35 +02:00
Richard Hansen 59c03bde20 lint: Re-run `eslint --fix` 2021-05-12 11:26:35 +02:00
Richard Hansen 30eadad79d lint: Bump ESLint dependencies 2021-05-12 11:26:35 +02:00
webzwo0i 24929d3417 package.json: bump npm from 6.14.11 to 6.14.13 2021-05-07 14:58:57 +02:00
webzwo0i 10f00906f8 update package-lock.json 2021-05-07 14:58:57 +02:00
snyk-bot ff245dbbeb fix: upgrade underscore from 1.13.0 to 1.13.1
Snyk has created this PR to upgrade underscore from 1.13.0 to 1.13.1.

See this package in npm:
https://www.npmjs.com/package/underscore

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-05-07 14:27:30 +02:00
translatewiki.net 4701cc43fa Localisation updates from https://translatewiki.net. 2021-05-07 10:50:38 +02:00
Richard Hansen b040ebf419 Revert "PadMessageHandler: Use a `Map` for `sessioninfos`"
Switching to a Map broke ep_webrtc and maybe other plugins.

This reverts commit eeead46437.
2021-05-05 18:09:10 -04:00
webzwo0i 3c087af038 caretPosition: fix loading when iframe is hidden 2021-05-04 23:56:13 +02:00
Richard Hansen 8baacd514e remote_runner: Always call `browser.quit()` 2021-05-03 01:48:08 -04:00
Richard Hansen 081f739a8d remote_runner: Update browser list
Use latest versions of Chrome, Firefox, Safari, and Edge. Keep the old
Chrome version.
2021-05-03 01:48:08 -04:00
Richard Hansen a7cd0a4b25 remote_runner: Avoid re-sending the same console text over and over 2021-05-03 01:48:08 -04:00
Richard Hansen 25275f2744 remote_runner: Treat no text as 0 lines, not 1 empty line 2021-05-03 01:48:08 -04:00
Richard Hansen a17556b876 remote_runner: Avoid searching the full text for "FINISHED" 2021-05-03 01:48:08 -04:00
Richard Hansen 3409e3f5e6 remote_runner: Prevent Sauce errors from interrupting other tests 2021-05-03 01:48:08 -04:00
Richard Hansen 68b041c4fb remote_runner: Use newline instead of backslash n 2021-05-03 01:48:08 -04:00
Richard Hansen 713e57b451 remote_runner: Don't break long lines
Breaking lines makes it harder to read and search the test output.
2021-05-03 01:48:08 -04:00
Richard Hansen 7d75e0ef8f remote_runner: Simplify `append()` 2021-05-03 01:48:08 -04:00
Richard Hansen bbb3046a87 remote_runner: Promisify 2021-05-03 01:48:08 -04:00
Richard Hansen 9059a55873 remote_runner: Improve readability of timeout duration 2021-05-03 01:48:08 -04:00
Richard Hansen c803ec81f1 remote_runner: Handle webdriver errors 2021-05-03 01:48:08 -04:00
Richard Hansen 7f57b17b2e remote_runner: Use Error objects to convey pass/fail 2021-05-03 01:48:08 -04:00
Richard Hansen 4ec02a9af9 remote_runner: Simplify finished test check 2021-05-03 01:48:08 -04:00
Richard Hansen b0e367a982 remote_runner: Simplify logging of console text 2021-05-03 01:48:08 -04:00
Richard Hansen 08856fe42e remote_runner: Move `logIndex` updates into `printLog()` 2021-05-03 01:48:08 -04:00
Richard Hansen a12c475776 remote_runner: Use an options object to create webdriver object 2021-05-03 01:48:08 -04:00
Richard Hansen 925f789d4c remote_runner: Simplify logging 2021-05-03 01:48:08 -04:00
Richard Hansen 014e19cf7d remote_runner: `await` each browser test 2021-05-03 01:48:07 -04:00
Richard Hansen 1f3a831cc3 remote_runner: Avoid duplication in task list 2021-05-03 01:48:07 -04:00
Richard Hansen 59be8d5c05 remote_runner: Delete commented-out browsers
Also delete useless and incorrect browser comments.
2021-05-03 01:48:07 -04:00
Richard Hansen a58fa4a2c5 tests: Add tests for `SkipList.atOffset()` 2021-05-03 01:42:03 -04:00
Richard Hansen c00031a8d8 skiplist: Use `Map.size` to get number of nodes 2021-05-03 01:42:03 -04:00
Richard Hansen 1cdfe9193b skiplist: Convert `_keyToNodeMap` to a `Map` object 2021-05-03 01:42:03 -04:00
Richard Hansen e2eb7327c2 skiplist: Sanity check inserted entries 2021-05-03 01:42:03 -04:00
Richard Hansen 9e2ef6ad5b skiplist: Move `propagateWidthChange()` to `Node` class 2021-05-03 01:42:03 -04:00
Richard Hansen fc103e7f2a skiplist: Define a new `Node` class 2021-05-03 01:42:03 -04:00
Richard Hansen 9fc88f3601 skiplist: Convert point operations into `Point` methods 2021-05-03 01:42:03 -04:00
Richard Hansen 3c1be95e07 skiplist: Move point creation to a new `Point` class 2021-05-03 01:42:03 -04:00
Richard Hansen 8ae40e80f9 skiplist: Save entry in `_insertKeyAtPoint()` 2021-05-03 01:42:03 -04:00
Richard Hansen 0e424fa8c3 skiplist: Remove unnecessary `newKey` arg from `_insertKeyAtPoint()` 2021-05-03 01:42:03 -04:00
Richard Hansen ab8c354f18 skiplist: Use ES6 class syntax
This makess it easier to examine state in dev console.
2021-05-03 01:42:03 -04:00
Richard Hansen 303fd297bd editor: Improve documentation comments 2021-05-03 01:42:03 -04:00
Richard Hansen cbbcef8e90 AttributeManager: Add sanity checks 2021-05-03 01:42:03 -04:00
Richard Hansen d40d59d9eb AttributeManager: Simplify logic 2021-05-03 01:42:03 -04:00
Richard Hansen e3d32a26b6 skiplist: Delete unused methods 2021-05-03 01:42:03 -04:00
Richard Hansen f650c3d73e editor: Delete unused `PROFILER` code 2021-05-03 01:42:03 -04:00
Richard Hansen ab4e99f67a editor: Delete commented-out code 2021-05-03 01:42:03 -04:00
Richard Hansen eeead46437 PadMessageHandler: Use a `Map` for `sessioninfos`
Maps are a bit more flexible, have clearer semantics, and have a
convenient `size` property.
2021-05-03 01:35:11 -04:00
Richard Hansen 14d4aadfe4 PadMessageHandler: Parallelize client updates
Multiple clients are updated in parallel, but multiple revisions sent
to a particular client are still sent sequentially.
2021-05-03 01:35:11 -04:00
Richard Hansen 770755debf PadMessageHandler: Assume sessioninfo stays valid during client update
...but add a try/catch around the message transmission just in case.
2021-05-03 01:35:11 -04:00
Richard Hansen c85391862b PadMessageHandler: Avoid unnecessary property lookups 2021-05-03 01:35:11 -04:00
Richard Hansen d5c6a44d9c PadMessageHandler: Improve documentation of `sessioninfos` 2021-05-03 01:35:11 -04:00
Richard Hansen 4c4415e14a PadMessageHandler: Register `activePads` metric only once 2021-05-03 01:35:11 -04:00
snyk-bot 6011d31b22 fix: upgrade underscore from 1.12.1 to 1.13.0
Snyk has created this PR to upgrade underscore from 1.12.1 to 1.13.0.

See this package in npm:
https://www.npmjs.com/package/underscore

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-05-03 01:31:53 -04:00
Richard Hansen 8f236b8687 Minify: Avoid crash due to unhandled Promise rejection if stat fails 2021-05-03 01:26:49 -04:00
Richard Hansen e8df643d75 Minify: Treat `ENOTDIR` like `ENOENT` when statting a file
This avoids an exception when require-kernel requests a path like
`existing-file.js/index.js`.
2021-05-03 01:26:48 -04:00
Richard Hansen aaacbd3a7a Minify: Refactor `requestURI()` for readability 2021-05-03 01:26:48 -04:00
translatewiki.net 3a8d66ba6a Localisation updates from https://translatewiki.net. 2021-04-30 08:49:17 +02:00
translatewiki.net 3afc77dae7 Localisation updates from https://translatewiki.net. 2021-04-26 15:20:55 +02:00
Richard Hansen 8384a7a67b deps: Bump ueberdb2 2021-04-20 21:56:44 +02:00
Richard Hansen ea8846154f favicon: Redo favicon customization 2021-04-20 13:33:55 -04:00
Richard Hansen 92e0bff80c favicon: Refactor handler and add tests 2021-04-20 13:33:55 -04:00
Richard Hansen d0d4b95980 favicon: Only serve from `/favicon.ico` 2021-04-20 13:33:54 -04:00
Richard Hansen c2ac5e6145 tests: Fix missing commit in "Upgrade from latest release" workflow 2021-04-20 13:20:33 -04:00
Richard Hansen 96208e8239 tests: Rename workflow to "Upgrade from latest release" 2021-04-20 13:20:04 -04:00
webzwo0i 3a5af19492 AuthorManager: await for more db methods 2021-04-20 11:27:44 -04:00
webzwo0i 35797e57fc AuthorManager: await db.set in createAuthor 2021-04-20 11:27:44 -04:00
webzwo0i 20c512c8a9 test for await db.set in createAuthor 2021-04-20 11:27:43 -04:00
Chocobozzz a001a13411 fix(perf): Disable wtfnode dump by default
Consumes a lot of CPU so it's better to enable it on purpose
2021-04-13 16:01:41 +02:00
Richard Hansen 951d369e3f padaccess: Delete useless try/catch 2021-04-12 22:51:06 -04:00
Richard Hansen 329d037431 Simplify read-only pad ID checks 2021-04-12 22:51:06 -04:00
Richard Hansen f63610bb12 tests: Test access bypass via read-only pad ID 2021-04-12 22:51:06 -04:00
pcworld 3c71e8983b Fix read only pad access with authentication
Before this commit, webaccess.checkAccess saved the authorization in
user.padAuthorizations[padId] with padId being the read-only pad ID,
however later stages, e.g. in PadMessageHandler, use the real pad ID for
access checks. This led to authorization being denied.

This commit fixes it by only storing and comparing the real pad IDs and
not read-only pad IDs.

This fixes test case "authn user readonly pad -> 200, ok" in
src/tests/backend/specs/socketio.js.
2021-04-12 22:51:06 -04:00
pcworld 0d33793908 tests: readonly pastes must be readable+exportable with authentication
readonly paste links should be readable even if authentication is turned
on, as long as the user provides valid login data.
This test currently fails.

Also test that readonly paste IDs can be exported under the same
condition, which currently succeeds.
2021-04-12 22:51:06 -04:00
translatewiki.net 7d5cad6932 Localisation updates from https://translatewiki.net. 2021-04-12 15:43:27 +02:00
Richard Hansen d01b593d3c chat: Ensure that `ctx.text` is interpreted as HTML 2021-04-11 06:20:29 +02:00
Richard Hansen a3a0ff7bc1 chat: Use jQuery to build the chat message DOM object
This reduces the likelihood of accidentally introducing an XSS
vulnerability.
2021-04-11 06:20:29 +02:00
Richard Hansen 74554d36a5 chat: Allow `chatNewMessage` hook to modify more values 2021-04-11 06:20:29 +02:00
Richard Hansen 1ad134a538 PadMessageHandler: Improve logging of pre-CLIENT_READY drops
This should make it easier to see what is emitting the the messages so
it can be fixed.
2021-04-09 18:43:02 +02:00
Richard Hansen 91e99c84ca import: Reduce log spam from unsupported elements 2021-04-09 18:43:02 +02:00
Richard Hansen 09c349e2a1 import: Use a Set for supported elements 2021-04-09 18:43:02 +02:00
translatewiki.net e31da37d00 Localisation updates from https://translatewiki.net. 2021-04-08 14:54:44 +02:00
webzwo0i a796811558 escape userId before setting it as HTML attribute 2021-04-07 23:29:27 -04:00
webzwo0i 9408d4395f remove custom timeouts 2021-04-07 17:47:11 -04:00
Mikk Andresen af19a010c5 DOCS: Fix broken links in TOC - use Marked to generate ID slugs instead of local implementation that was giving out different IDs in some cases - https://github.com/citizenos/citizenos-fe/issues/535 2021-04-06 21:42:01 +02:00
Mikk Andresen 78ea888cb7 DOCS: Add basic styles for tables and resources section to Changeset docs - https://github.com/citizenos/citizenos-fe/issues/535 2021-04-06 21:42:01 +02:00
webzwo0i e483b91916 Don't make browsers fail on sync-xhr until require-kernel is dropped 2021-04-05 04:34:29 -04:00
snyk-bot e86547c4f5 fix: upgrade openapi-backend from 3.9.0 to 3.9.1
Snyk has created this PR to upgrade openapi-backend from 3.9.0 to 3.9.1.

See this package in npm:
https://www.npmjs.com/package/openapi-backend

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-04-03 16:54:52 -04:00
Richard Hansen e4754eb9df tests: Fix race in `timeslider_revisions.js` 2021-04-02 15:46:27 +02:00
Richard Hansen 27e5373050 tests: Fix race in `change_user_name.js` 2021-04-02 15:46:27 +02:00
Richard Hansen 58dac4c0fc tests: Fix races in `inner_height.js` 2021-04-02 15:46:27 +02:00
Richard Hansen 4ad80d4072 tests: Delete overly aggressive frontend test timeouts
This should reduce test flakiness.
2021-04-02 15:46:27 +02:00
Richard Hansen 7cbb3f565d tests: Speed up `helper.edit()` and `helper.clearPad()` 2021-04-02 15:46:27 +02:00
Richard Hansen 7a154b1e1d tests: Wait for commit instead of sleep in `timeslider_revisions.js` 2021-04-02 15:46:27 +02:00
Richard Hansen d15ff9ce8d tests: Add missing `await`s to `change_user_name.js`
Also increase the timeouts.
2021-04-02 15:46:27 +02:00
Richard Hansen bbf89dfcf9 tests: Refine frontend tests
* Switch from `helper.newPad()` to `helper.aNewPad()`.
  * Promisify.
  * Delete redundant logic.
  * Lint fixes.
2021-04-02 15:46:27 +02:00
Richard Hansen 3790c0e41c tests: Use `async`/`await` instead of returning Promises
This has a few benefits:
  * It's more readable: It's easier for a user of the function to know
    that they should use `await` when calling the function.
  * Stack traces are more useful.
  * Some code (e.g., the async npm package) uses introspection to
    determine if a function is `async` vs. takes a callback.
2021-04-02 15:46:27 +02:00
Richard Hansen b164a34e64 lint: Fix ESLint error in `helper/methods.js` 2021-04-02 15:46:27 +02:00
Richard Hansen 62403159df tests: Invert conditions to improve readability 2021-04-02 15:46:27 +02:00
Richard Hansen dd9c08d821 tests: Wait for commit rather than sleep 2021-04-01 14:31:56 +02:00
Richard Hansen 2776946627 tests: Use cookie libraries to manipulate cookies 2021-04-01 14:31:56 +02:00
Richard Hansen 202d65d2bb pad_cookie: Re-read prefs cookie on every call to `getPref()`
This makes it easier to write tests that clear the prefs cookie.
2021-04-01 14:31:56 +02:00
Richard Hansen 0df41a9a78 pad_cookie: Move initial cookie read+save to `init()`
Benefits of this change:
  * It avoids race conditions with tests that clear cookies.
  * Any attempt to get or set a value before `init()` is called will
    throw an error, ensuring the API is used properly.
  * Improved readability: It's easier to understand what the
    `pad.noCookie` check is doing.
2021-04-01 14:31:56 +02:00
Richard Hansen aeee5c0b69 tests: Fix cookie name in `helper.js` tests 2021-04-01 14:31:56 +02:00
Richard Hansen 137fa89d2a tests: Always set cookie path to / (to match non-test behavior) 2021-04-01 14:31:56 +02:00
Richard Hansen 5666c34061 tests: Fix encoding of prefs cookie 2021-04-01 14:31:56 +02:00
Richard Hansen 63e6e163b7 tests: Promisify some of the `helper.js` tests 2021-04-01 14:31:56 +02:00
Richard Hansen 701a40ac13 tests: Promisify `multiple_authors_clear_authorship_colors.js` 2021-04-01 14:31:56 +02:00
Richard Hansen 8b43f9eb5f tests: Promisify `authorship_of_editions.js` 2021-04-01 14:31:56 +02:00
Richard Hansen 056939cd22 tests: Refine `helper/multipleUsers.js`
* Rename "current"/"other" to "user0"/"user1".
  * Delete unnecessary `_createTokenFor*` functions.
  * Rename helper functions to remove unnecessary leading underscore
    and for brevity.
  * Use jQuery's `.attr()` to build the second iframe.
  * Use js-cookie to manipulate the token cookie.
  * Don't attempt to set the token cookie if the pad isn't loaded.
  * Use the token generated by the pad.
  * Only clear the token cookie at path=/.
2021-04-01 14:31:56 +02:00
Guilherme Goncalves f2034ad368 tests: Add regression tests for character composition race
See: https://github.com/ether/etherpad-lite/issues/4978
2021-03-30 16:42:53 -04:00
Richard Hansen 1fdaf95c3b collab_client: Delete unused `NO_COMMIT_PENDING` handling 2021-03-30 16:42:53 -04:00
Richard Hansen 63a1f078f4 collab_client: Redo server message queueing
Move server message queue processing out of `handleUserChanges()` for
the following reasons:
  * Fix a race condition: Before this change the client would stop
    processing incoming messages and stop sending changes to the
    server if a `NEW_CHANGES` message arrived while the user was
    composing a character and waiting for an `ACCEPT_COMMIT` message.
  * Improve readability: The `handleUserChanges()` function is for
    handling changes from the local user, not for handling changes
    from other users.
  * Simplify the code.
2021-03-30 16:42:53 -04:00
Richard Hansen e99fe88537 collab_client: Use `Date.now()` instead of casting a Date object
Also rename the `t` variable to `now` to improve readability.
2021-03-30 16:42:53 -04:00
Richard Hansen 5c445eac21 collab_client: Convert `state` var to `committing` bool 2021-03-30 16:42:53 -04:00
Richard Hansen 3ee6b5eb2b collab_client: Delete unused `caughtErrors` 2021-03-30 16:42:53 -04:00
Richard Hansen 81b9a2544d collab_client: Factor out duplicate `ACCEPT_COMMIT` code 2021-03-30 16:42:53 -04:00
snyk-bot dd09a3f12b fix: src/package.json & src/package-lock.json to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-UNDERSCORE-1080984
2021-03-30 18:26:32 +02:00
Richard Hansen b9753dcc71 Changeset: Return a new op object by default when iterating
Reusing the same op object for each iteration can result in very weird
behaviors because previously yielded op objects will get a surprise
mutation.

It is unclear why the code was written to reuse the same object. There
was no comment, nor is there a commit message providing rationale (it
has behaved this way since the very first commit). Perhaps the objects
were reused to improve performance (fewer object allocations that need
to be garbage collected). I do expect this change to reduce
performance somewhat, but not enough to warrant reverting this commit.
2021-03-29 18:42:55 -04:00
Richard Hansen 718da6fc1b tests: New `helper.aNewPad()` (promisified `newPad()`) 2021-03-29 18:40:05 -04:00
Richard Hansen ec76a6548f tests: Make the `helper.newPad()` callback optional 2021-03-29 18:40:05 -04:00
Richard Hansen 27b35699ea tests: Fix `helper.newPad()` retries
* Pass retry count in options object so that each pad has its own
    retry count.
  * Delete useless `origPadName` variable.
2021-03-29 18:40:05 -04:00
translatewiki.net eac5a52690 Localisation updates from https://translatewiki.net. 2021-03-29 17:55:09 +02:00
John McLear b80f5bdae8
bugfix/tests/scaling: Socket query test fix (#4974)
fix socketio test where res.req is not available.
2021-03-24 21:03:48 +00:00
John McLear 2b98b930d7
scaling: include padId in socketio query string 2021-03-24 16:07:11 +00:00
webzwo0i 0e854a5892 fix wrong changelog entry 2021-03-22 17:26:55 +01:00
webzwo0i 7af0641f04 Merge branch 'master' into develop 2021-03-22 16:17:27 +01:00
webzwo0i 5db0c8d1cf Merge branch 'develop' 2021-03-22 16:17:20 +01:00
webzwo0i 3ae6b01518 bump version 2021-03-22 16:17:18 +01:00
webzwo0i 65b644498f bump require-kernel dependency 2021-03-21 18:30:39 +00:00
webzwo0i 826826bd37 add changelog for 1.8.13 2021-03-21 15:42:16 +00:00
John McLear a8f9c2b6a7
fix: upgrade express-rate-limit from 5.2.5 to 5.2.6 (#4938)
Snyk has created this PR to upgrade express-rate-limit from 5.2.5 to 5.2.6.

See this package in npm:
https://www.npmjs.com/package/express-rate-limit

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
2021-03-20 17:45:00 -04:00
Richard Hansen eb3cff5b3a LibreOffice: Remove unnecessary callbackification
`async.queue` will do the right thing if passed an `async` function.
2021-03-20 20:29:55 +00:00
Richard Hansen 0233399fdf Abiword: Avoid calling `stdoutCallback` multiple times 2021-03-20 20:29:55 +00:00
webzwo0i c208d50c4a add version string to iframe_editor.css 2021-03-20 16:42:08 +00:00
webzwo0i b250ceaae7 add test for wrong clientHeight 2021-03-20 16:41:15 +00:00
Richard Hansen 3ad1d0a74f cssmanager: Refactor CSS manager creation to avoid race condition
Safari takes a while to initialize `document.styleSheets`, which
results in a race condition when loading the pad. Avoid the race
condition by accessing the CSSStyleSheet objects directly from the
HTMLStyleElement DOM objects.
2021-03-20 01:07:16 +00:00
Richard Hansen e2bfe2fd10 pad_editor: Promisify `init()` 2021-03-20 01:07:16 +00:00
Richard Hansen 81e36cf3c7 Ace2Inner: Promisify `init()` 2021-03-20 01:07:16 +00:00
Richard Hansen 742a7cd430 cssmanager: Throw if no matching style sheet is found
This avoids a later null dereference when the stack trace isn't as
useful.
2021-03-20 01:07:16 +00:00
Richard Hansen 5b05ee79ff cssmanager: Simplify iteration over style sheets 2021-03-20 01:07:16 +00:00
Richard Hansen cb9f6d6776 ace: Use iframe `srcdoc` property to refine frame load logic
This seems to fix "null is not an object (evaluating
'browserSheet.insertRule')" errors on Safari.
2021-03-19 17:06:58 +01:00
Richard Hansen b4e1e935e2 LibreOffice: Log conversion errors 2021-03-18 09:02:28 +00:00
Richard Hansen b2c0837cf5 import/export: Promisify Abiword and LibreOffice conversion 2021-03-18 09:02:28 +00:00
Richard Hansen b321267e66 LibreOffice: Use the async-provided callback to signal errors
This avoids having two callbacks, which improves readability.
2021-03-18 09:02:28 +00:00
Richard Hansen b914a46a87 LibreOffice: Use `async.series` to properly handle conversion errors 2021-03-18 09:02:28 +00:00
Richard Hansen a6d5611c80 LibreOffice: Use consistent intermediate filename 2021-03-18 09:02:28 +00:00
Richard Hansen ad0be9d1d2 LibreOffice: Add missing `fileExtension` property on intermediate step 2021-03-18 09:02:28 +00:00
Richard Hansen 5eab3a123d Abiword: Use the async-provided callback to signal errors
This avoids having two callbacks, which improves readability.
2021-03-18 09:02:28 +00:00
Richard Hansen 8d32463915 Abiword: Fix logging of conversion failure 2021-03-18 09:02:28 +00:00
Richard Hansen f015f59cfc Abiword: Reduce log spam 2021-03-18 09:02:28 +00:00
Richard Hansen 259ee4a987 Abiword: Don't call the callback if null 2021-03-18 09:02:28 +00:00
Richard Hansen 83f39289aa import/export: On export error return 500 instead of crashing 2021-03-18 09:02:28 +00:00
Richard Hansen 3a11e97758 import/export: Spelling fix: "convertor" -> "converter" 2021-03-18 09:02:28 +00:00
Richard Hansen 50fdadab7d ExportHandler: Pass the error unmodified 2021-03-18 09:02:28 +00:00
Richard Hansen 216aecd433 import/export: Use Error objects for errors, not strings 2021-03-18 09:02:28 +00:00
Richard Hansen 59c167e31b ExportHandler: Replace unnecessary exception with `return` 2021-03-18 09:02:28 +00:00
Richard Hansen 785b7d2b44 Abiword: Reset stdout buffer when starting abiword 2021-03-18 09:02:28 +00:00
Richard Hansen b6c2586920 import/export: Delete unnecessary comments 2021-03-18 09:02:28 +00:00
Richard Hansen fe1eceb6b5 tests: Use `assert` to simplify import/export tests 2021-03-18 09:02:28 +00:00
Richard Hansen 98c42d6076 tests: Promisify import/export tests 2021-03-18 09:02:28 +00:00
Richard Hansen ff50682412 tests: Increase import/export test timeouts 2021-03-18 09:02:28 +00:00
translatewiki.net 5c9514f926 Localisation updates from https://translatewiki.net. 2021-03-15 19:03:09 +01:00
Richard Hansen c5a37d7a92 deps: Bump ueberdb2 to get MySQL improvements 2021-03-13 19:51:43 +00:00
webzwo0i 6f591b5c77
add class pad to timeslider to fix height issue (#4941) 2021-03-12 21:16:22 -05:00
webzwo0i 8e2a21ec84
arrow functions dont have arguments (#4943) 2021-03-12 14:25:14 -05:00
Richard Hansen 0b9bf4a78e deps: Update ueberdb2 to get updated metrics 2021-03-11 20:21:38 +00:00
Richard Hansen 9b82d1d37d server: Log stats (metrics) on fatal error
This might help users troubleshoot rare crashes.
2021-03-11 07:38:44 +00:00
Richard Hansen d2610284ad bin/safeRun.sh: Fix `try: not found` bug
This fixes a copy+paste bug introduced in commit
8b28e00784 (v1.8.8).
2021-03-10 02:54:20 -05:00
John McLear 9bc3ac0957 Include shard.etherpad.com in the README 2021-03-09 18:10:49 +00:00
Richard Hansen fcf43a7089 stats: Expose ueberDB metrics 2021-03-08 22:32:39 +00:00
Richard Hansen 71dfa7070d deps: Update ueberdb2 to get metrics 2021-03-08 22:32:39 +00:00
Richard Hansen 926f0fcefb CSS: Increase size of contenteditable area 2021-03-08 14:39:18 +00:00
Richard Hansen 404486069c ace: Build the outer and inner iframes programmatically
This makes the code easier to read and it silences Chrome's
`document.write()` warning:
https://developers.google.com/web/updates/2016/08/removing-document-write

This is a redo of commit a17f9bf3cf,
which was reverted in commit 912f0f195f
due to a CSS bug.
2021-03-05 19:31:59 +00:00
webzwo0i 4ca989a255
sessions: add more endpoints that do not need a session (#4921)
* add more endpoints that do not need a session

* Update src/node/hooks/express/webaccess.js

Co-authored-by: Richard Hansen <rhansen@rhansen.org>

* Update src/node/hooks/express/webaccess.js

Co-authored-by: Richard Hansen <rhansen@rhansen.org>

Co-authored-by: John McLear <john@mclear.co.uk>
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-03-05 07:48:33 +00:00
Richard Hansen 60da2373a6 CSS: Add comment to `no-skin/pad.css` to silence warning
Firefox prints "Style sheet could not be loaded" if the file is empty.
2021-03-05 07:45:48 +00:00
Richard Hansen 5546cc5e7b CSS: Delete bogus `<link>` tag
Browsers report an error with this tag. Strangely, this tag has
existed since Etherpad's very first commit.
2021-03-05 07:45:48 +00:00
Richard Hansen 470f40d7db CSS: Use `auto` for iframe body height
This change makes no visual difference right now, but will matter (for
reasons I don't understand) once we change `ace.js` to build the
iframes by constructing elements in JavaScript (vs. writing HTML).
2021-03-05 07:45:48 +00:00
Richard Hansen 48e1d1c23f CSS: Fix class name for outer iframe `<html>` tag
* Add the class "pad" to the `<html>` tag in `pad.html` (the outer
    iframe's parent).
  * Change the CSS selector that refers to the `<html>` tag in
    `pad.html` from `html:not(.inner-editor)` to `html.pad`.
  * Change the class name of the outer iframe's `<html>` tag from
    "inner-editor" to "outer-editor".
  * Update CSS rules to use the new class name.
2021-03-05 07:45:48 +00:00
John McLear 6615d36f8d
Merge branch 'master' into develop 2021-03-05 07:28:48 +00:00
John McLear b99c2cae22
Merge branch 'develop' 2021-03-05 07:28:47 +00:00
John McLear de394f72a6
bump version 2021-03-05 07:28:44 +00:00
John McLear dabb4917ed
changelog 1.8.12 2021-03-05 07:27:31 +00:00
John McLear 5ac90ab30f tests: Allow time for minification to complete
Minification happens after the initial visit and request to pages.
2021-03-05 07:11:42 +00:00
John McLear 536db7553f
tests: CI of updating from master > this commit. (#4912)
* tests: CI of updating from master > this commit.

In response to cypress eslint I thought I'd put some CI testing for if a PR might break automated upgrading.

Matrix usage is probably overkill.

* Update major-version-git-pull-update.yml

* Name...

* include a front end test

* fix pathing

* Clarity on what's happening

* Update .github/workflows/major-version-git-pull-update.yml

Co-authored-by: Richard Hansen <rhansen@rhansen.org>

* Update .github/workflows/major-version-git-pull-update.yml

Co-authored-by: Richard Hansen <rhansen@rhansen.org>

* Update .github/workflows/major-version-git-pull-update.yml

Co-authored-by: Richard Hansen <rhansen@rhansen.org>

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-03-05 06:38:50 +00:00
snyk-bot d0e257d8df fix: upgrade resolve from 1.19.0 to 1.20.0
Snyk has created this PR to upgrade resolve from 1.19.0 to 1.20.0.

See this package in npm:
https://www.npmjs.com/package/resolve

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-03-05 06:37:45 +00:00
Richard Hansen eccec0ba0a Docker: Invoke npm only once when installing plugins
This speeds up the build process.
2021-03-04 19:07:03 +00:00
Richard Hansen c07bfe10bd Docker: Add arg for the Etherpad directory
This makes it possible for users to match the directory inside the
container to the host system (for convenience or to avoid confusion).
2021-03-04 19:07:03 +00:00
Richard Hansen 34d9069874 Docker: Add args for the etherpad user's home, UID, GID, and shell
Now one can create an `etherpad` user and group on the host system and
set the container's UID and GID to match:

    adduser --system --group etherpad &&
    uid=$(id -u etherpad) &&
    gid=$(id -g etherpad) &&
    docker build --build-arg EP_UID="${uid}" --build-arg EP_GID="${gid}" .

This ensures that files created by user `etherpad` inside the
container are owned by user `etherpad` outside the container.
2021-03-04 19:07:03 +00:00
translatewiki.net 21cdf0edaa Localisation updates from https://translatewiki.net. 2021-03-04 13:58:49 +01:00
Richard Hansen 912f0f195f Revert "ace: Build the outer and inner iframes programmatically"
This reverts commit a17f9bf3cf, which
caused a mysterious bug with the line numbers. Revert to avoid
blocking a new release while I figure out the bug.
2021-03-04 02:05:54 +00:00
Richard Hansen 0aad3b74da pluginfw: Improve rendering of hook list
There are two main benefits:
  * HTML is no longer printed in the startup debug logs.
  * `require()` is no longer called on client-side files. This
    eliminates "Failed to load <file> for <plugin>: ReferenceError:
    window is not defined" errors when users visit
    `/admin/plugins/info`.
2021-03-03 11:19:37 +00:00
Richard Hansen 7e698baa80 pluginfw: Improve hook function load error message 2021-03-03 11:19:37 +00:00
John McLear f95b09e0b6
Import: Import don't show warnings for supported elements 2021-03-02 17:14:47 +00:00
John McLear f24353e806
Update README.md 2021-03-02 07:00:05 +00:00
John McLear 05b27cfd5d
Update README.md 2021-03-02 06:54:08 +00:00
snyk-bot 2fd06535b7 fix: upgrade express-rate-limit from 5.2.3 to 5.2.5
Snyk has created this PR to upgrade express-rate-limit from 5.2.3 to 5.2.5.

See this package in npm:
https://www.npmjs.com/package/express-rate-limit

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-03-02 06:52:15 +00:00
Richard Hansen 797ffa5600 Minify: Avoid `path.relative()`
Constructing a relative pathname on Windows is problematic because the
two absolute pathnames might be on different drives (or UNC paths).
Use `path.resolve()` instead of `path.join()` where appropriate to
avoid the need to construct a relative path.
2021-03-02 06:20:10 +00:00
Richard Hansen 8971166c58 lint: Set up Cypress config and fix issues 2021-03-02 05:49:48 +00:00
John McLear a79f9efdb4
Include props to Sauce Labs for the tests they power. (#4897)
* Include props to Sauce Labs for the tests they power.

* include message in CI
2021-03-01 14:46:50 +00:00
Richard Hansen b0862cd030 ace: Delete all `$$INCLUDE_CSS` logic
The intention of the deleted code was to reduce the number of fetches,
but it only saved a single fetch due to implementation flaws. The
right way to reduce the number of fetches is to use a bundling
technology such as webpack, and this change makes it easier to do so.
2021-03-01 14:32:33 +00:00
Richard Hansen 66d3ac3783 ace: Debug logging 2021-03-01 14:32:33 +00:00
Richard Hansen a17f9bf3cf ace: Build the outer and inner iframes programmatically
This makes the code easier to read and it silences Chrome's
`document.write()` warning:
https://developers.google.com/web/updates/2016/08/removing-document-write
2021-03-01 14:32:33 +00:00
Richard Hansen c696732838 ace: Asyncify `Ace2Editor.init()` 2021-03-01 14:32:33 +00:00
Richard Hansen 159fd5bdeb ace: Simplify passing of `editorInfo` 2021-03-01 14:32:33 +00:00
Richard Hansen e57829183d ace: Pass objects to Ace2Inner via function args 2021-03-01 14:32:33 +00:00
Richard Hansen 6fe0154129 ace: Use absolute URLs when building iframes
This isn't strictly necessary right now, but will become
necessary (due to a Safari quirk) when we change to building the
iframes programmatically (vs. the current `document.write()`
approach).
2021-03-01 14:32:33 +00:00
Richard Hansen 9cfc2fb801 ace: Simplify the `aceEditorCSS` hook map function 2021-03-01 14:32:33 +00:00
Richard Hansen 94c221586c ace: Factor out duplicated `$$INCLUDE_CSS` code 2021-03-01 14:32:33 +00:00
Richard Hansen 54df7f3728 ace: Delete unused `clientVars.disableCustomScriptsAndStyles` 2021-03-01 14:32:33 +00:00
Richard Hansen d84447290e ace: Delete unnecessary IIFE 2021-03-01 14:32:33 +00:00
Richard Hansen 3a311d2182 ace: Lint and simplify script strings 2021-03-01 14:32:33 +00:00
Richard Hansen c9b1f17f25 ace: Format script strings for readability 2021-03-01 14:32:33 +00:00
Richard Hansen b3416c4eeb ace: Delete ignored class attribute 2021-03-01 14:32:33 +00:00
Richard Hansen c9c8b27854 ace: Delete unused `Ace2Editor.getFrame()` method 2021-03-01 14:32:33 +00:00
John McLear 64e9e7fcda
tests: Frontend test Windows ZIP (#4894)
* tests:  Frontend test Windows ZIP

This PR introduces Frontend testing within Github actions!

We're depending a lot on saucelabs recently and that's fine but sometimes we just want to quickly do a frontend simple test on a weird environment (IE windows build) so this PR solves that problem.

Things to note.

    It still builds the windows .zip if the cypress tests fail.
    It does not add any heavy deps to Etherpad as cypress must be installed in CI.
    Cypress is responsible for running the Etherpad instance.

It's up to us how much we use this or not, I know it introduces a bunch of technical debt but I tried to keep that a minimum by compartmentalizing things and documenting where required.

* Update .github/workflows/windows-zip.yml

Co-authored-by: Richard Hansen <rhansen@rhansen.org>

* remove timeouts

* Move folder structure up a level

* Update windows-zip.yml

* Update test.js

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-03-01 14:31:55 +00:00
John McLear b0f16bb1f1 Use stable sauce version 2021-03-01 13:08:34 +00:00
John McLear b3d7f5d63e pluginTools: stalePlugins.js
Outputs a list of pluginnames and email address for maintainers to contact.  Useful for me to bump folks to maintain there stuff and stop it getting stale :)
2021-02-28 16:05:53 +00:00
John McLear 35ae08ca77
tests: run a long(1+ hr) load test 2021-02-28 16:05:16 +00:00
John McLear d7fd3934de
Merge branch 'develop' of github.com:ether/etherpad-lite into develop 2021-02-28 15:51:51 +00:00
John McLear 237bab7e3e
branding: change etherpad lite to etherpad in Pad settings modal 2021-02-28 15:51:39 +00:00
Stefan a6ac0940cd Link discord and plugins badge with a meaningful url 2021-02-28 11:24:10 +00:00
Richard Hansen 99b3918f2c Minify: Compatibility for all `vendors/*.js` files 2021-02-28 11:12:30 +00:00
John McLear b0d78d662e
tests: include ep_embedmedia in tests (#4889) 2021-02-28 09:26:43 +00:00
Richard Hansen 3667f2ca0e Ace2Inner: Fix missing spread operator on `args`
This fixes a bug that was introduced in commit
c38c34bef4.
2021-02-28 08:39:47 +00:00
Richard Hansen 16e6496eb4 deps: Update ueberdb2 to fix dirty DB bug 2021-02-28 08:03:20 +00:00
webzwo0i 377883db98
fix pads with spaces (#4884) 2021-02-27 22:34:43 -05:00
John McLear 68c4ed7189
Merge branch 'master' into develop 2021-02-27 16:46:26 +00:00
John McLear ad84c8a5a4
Merge branch 'develop' 2021-02-27 16:46:25 +00:00
John McLear 37769cc9ff
bump version 2021-02-27 16:46:22 +00:00
John McLear c394577695
changelog 1.8.11 2021-02-27 16:45:02 +00:00
webzwo0i 348d08c79e ensure version string is attached for inner frame resources 2021-02-27 16:28:12 +00:00
webzwo0i 01dd9f5440 speed up page load 2021-02-27 16:28:12 +00:00
John McLear ba2004cb2d nice-select restore to working
I accidently committed a breaking change in 1b8cd0747d/src/static/js/vendors/nice-select.js
2021-02-27 16:23:39 +00:00
Richard Hansen 3a34db84e6 tests: Refine CachingMiddleware tests
* Lint functions
  * Fix assignment of `settings.minify`
  * Use a for loop to avoid copied code for the `minify = true` and
    `minify = false` cases
  * Put each resource fetch into its own test case
  * Check for 200 status code
  * Use `.expect()` to check header value
  * Use `.expect(fn)` instead of `.then(fn)`
2021-02-27 14:03:09 +01:00
Richard Hansen f86df5322e CachingMiddleware: Asyncify 2021-02-27 14:03:09 +01:00
Richard Hansen 0284d49522 CachingMiddleware: Switch to ES6 class syntax 2021-02-27 14:03:09 +01:00
Richard Hansen 80af66543a lint: Move up `respond()` in `caching_middleware.js` 2021-02-27 14:03:09 +01:00
Richard Hansen 7ab3ee2121 lint: `src/node/utils/caching_middleware.js` 2021-02-27 14:03:09 +01:00
Richard Hansen 392d9dcfde PadMessageHandler: Fix fetching of socket.io Sockets for a pad 2021-02-27 08:46:49 +00:00
Richard Hansen 9cd67cd990 PadMessageHandler: Delete unnecessary use of `Promise.then()` 2021-02-27 08:46:49 +00:00
webzwo0i 15dba7d886
move underscore to its old place and remove unnecessary packages (#4876) 2021-02-27 00:10:53 -05:00
John McLear c0ec28f781 reversecompat: underscore
Backward compatibility for plugins that were written when underscore lived at src/static/js/underscore.js.
2021-02-26 11:03:19 +00:00
John McLear 50782bd03a
Merge branch 'master' into develop 2021-02-25 18:26:21 +00:00
John McLear 55f76c565c
Merge branch 'develop' 2021-02-25 18:26:20 +00:00
John McLear 11f3b7232d
bump version 2021-02-25 18:26:17 +00:00
John McLear 6efa41ec23
update Changelog 1.9.10 2021-02-25 18:25:00 +00:00
webzwo0i efd211bbc5 remove useless semicolon 2021-02-25 16:59:06 +00:00
webzwo0i fa29858a4e avoid manually including require-kernel in ace.js 2021-02-25 16:59:06 +00:00
translatewiki.net 12c23d468c Localisation updates from https://translatewiki.net. 2021-02-25 16:17:56 +01:00
webzwo0i a77994ab6e avoid pad_utils in pad.html 2021-02-25 12:46:04 +00:00
John McLear 9675a584ce
Windows Installer Badge into README
Windows Installer Badge into README
2021-02-25 10:44:00 +00:00
Richard Hansen ba5d8369bf Minify: Consistently use `path.join()` to build pathnames
This defends against extraneous or missing slashes, and it might
improve the experience on Windows.
2021-02-25 10:14:48 +00:00
Richard Hansen 2d3469e3ee Minify: Improve pathname sanitization
For context, see:
https://nvd.nist.gov/vuln/detail/CVE-2015-3297
9d4e5f6e35
https://github.com/ether/etherpad-lite/issues/2614
2021-02-25 10:14:48 +00:00
Richard Hansen 0cce4ae536 Minify: Also serve `jquery.js` from old path for compatibility 2021-02-25 10:14:48 +00:00
Richard Hansen f845f21ba5 /static/tests.html: Fix `jquery.js` path
See commit 1b8cd0747d.
2021-02-25 10:14:48 +00:00
John McLear fc7acad846
artifacts: Windows CI Installer
* Windows CI Installer

This PR introduces CI builds of a windows installer(using NSIS) .

It builds an executable that installs Etherpad and runs it.

There are obvious steps to make once this has been merged. But I'd suggest on each release we include both the .zip and the .exe and allow users to have a portable zip or an installed executable.

https://github.com/ether/etherpad_nsis

This was a relatively rushed project (4 hours) and I didn't want to spend any more time on it so it will need a foster parent to maintain it :)

props to @joncloud for https://github.com/joncloud/makensis-action-test and the nsis team that while have a horrible UX make relatively easy to use and rapid tools.

Note for review: I'm using linux to build the windows executable, this may need to be reviewed and we might want to switch to Windows if we can confirm building on linux causes a problem.

* CI: Use Windows to build the .zip
2021-02-25 10:00:33 +00:00
John McLear 4a65acf417
docs: fix links from TOC to Headings and improve appearance of docs (a little) (#4866)
* docs: fix links from TOC to Headings
* docs: Styling

Just a little modernisation of the appearance of the documentation

* Update src/bin/doc/package.json

Co-authored-by: Richard Hansen <rhansen@rhansen.org>

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-02-25 09:01:45 +00:00
Richard Hansen 41ec7fe3fc deps: Update ueberdb2 to work around dirty DB bug 2021-02-25 00:02:14 +00:00
Dan Sonntag 79fee9e796 Update README.md 2021-02-24 18:44:07 +00:00
Richard Hansen b2ffd8c95c lint: Update ESLint dependencies 2021-02-24 09:07:24 +00:00
Richard Hansen 6f17d2f913 CI: Use Windows to build the Windows zip
npm might do something different on Windows when setting up the
executables in `src/node_modules/.bin`.
2021-02-23 22:40:15 -05:00
Richard Hansen dabff9be77 run_cmd: Fix PATH debug log message 2021-02-23 21:41:32 -05:00
John McLear c7511b2f2e tests: change timeout on bold and embed_value test to support Win10 FF84 2021-02-23 19:53:03 +00:00
John McLear 72d9c8fef9 tests: Use more modern relevant Firefox version in Sauce Labs
Firefox 52 has issues with rendering SVG animations which caused random tests to fail.  Less than 2% of total Firefox users now use Firefox 52 so we're safe to drop testing for it.
2021-02-23 19:53:03 +00:00
John McLear 1a9709bb87
Update README.md 2021-02-23 07:24:39 +00:00
John McLear 8364546e70 tests: fix importexport tests
The testing approach was redone to fix numerous issues:
  * Even if the tests had been working, none of them would have caught
    https://github.com/ether/etherpad-lite/issues/4808 because they
    didn't exercise the client-side import logic. Now they do.
  * Follow-up logic was not in the `helper.waitFor()` callback like it
    should have been. Now the code uses `async` and `await` to ensure
    proper execution order.
  * All `$.ajax()` calls used `async: false`. Now they're properly
    asynchronous.
  * The `helper.waitFor()` condition callbacks threw instead of
    returning false.
  * The string comparisons didn't allow for different attribute
    order (e.g., `<ol start="1" class="list-number1">` vs. `<ol
    class="list-number1" start="1">`). Now `Node.isEqualNode()` is
    used to reduce fragility. (`Node.isEqualNode()` is not perfect, so
    the tests are still a bit fragile: If class names or style strings
    are in a different order then `Node.isEqualNode()` will return
    false even if the nodes are semantically equivalent.)

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-02-22 18:20:24 -05:00
Richard Hansen e9cb1692eb CI: Disable import/export rate limiting for frontend tests 2021-02-22 18:20:24 -05:00
Richard Hansen 644c8e6195 CI: Disable frontend admin tests for non-admin workflow 2021-02-22 18:20:24 -05:00
Richard Hansen a354b03633 CI: Leave log level at INFO for frontend tests 2021-02-22 18:20:24 -05:00
Richard Hansen 3ca1589885 Revert "tests: fix importexport frontend tests (#4827)"
I'm going to split this into separate commits.

This reverts commit 9b03f8f6ab.
2021-02-22 18:19:48 -05:00
translatewiki.net f246d1b476 Localisation updates from https://translatewiki.net. 2021-02-22 16:37:36 +01:00
John McLear 0ac33d2085 tests: timeslider_follow increase test timeout for firefox. 2021-02-22 14:30:19 +00:00
Richard Hansen 1908bedabe caretPosition: Clarify comment in `getPosition()` 2021-02-22 11:25:45 +00:00
Richard Hansen 91955609af caretPosition: Delete pointless logic in `getPosition()`
The `line` variable is unconditionally overwritten later, and the
function calls do not have side effects, so it is safe to delete this
logic.
2021-02-22 11:25:45 +00:00
Richard Hansen 1dbdaf93d7 caretPosition: Delete no-op `Range.detach()` call 2021-02-22 11:25:45 +00:00
Richard Hansen 5e731dfbfd caretPosition: Delete unused var in `getPosition()` 2021-02-22 11:25:45 +00:00
Richard Hansen 02fd0048bf caretPosition: Invert condition in `getPosition()` for readability 2021-02-22 11:25:45 +00:00
Richard Hansen 773959ec57 CI: Delete old Sauce Connect logic 2021-02-22 11:25:21 +00:00
John McLear 9b03f8f6ab
tests: fix importexport frontend tests (#4827)
* CI: Leave log level at INFO for frontend tests

* CI: Disable frontend admin tests for non-admin workflow

* CI: Disable import/export rate limiting for frontend tests

* tests: fix importexport tests

The testing approach was redone to fix numerous issues:
  * Even if the tests had been working, none of them would have caught
    https://github.com/ether/etherpad-lite/issues/4808 because they
    didn't exercise the client-side import logic. Now they do.
  * Follow-up logic was not in the `helper.waitFor()` callback like it
    should have been. Now the code uses `async` and `await` to ensure
    proper execution order.
  * All `$.ajax()` calls used `async: false`. Now they're properly
    asynchronous.
  * The `helper.waitFor()` condition callbacks threw instead of
    returning false.
  * The string comparisons didn't allow for different attribute
    order (e.g., `<ol start="1" class="list-number1">` vs. `<ol
    class="list-number1" start="1">`). Now `Node.isEqualNode()` is
    used to reduce fragility. (`Node.isEqualNode()` is not perfect, so
    the tests are still a bit fragile: If class names or style strings
    are in a different order then `Node.isEqualNode()` will return
    false even if the nodes are semantically equivalent.)

Co-authored-by: Richard Hansen <rhansen@rhansen.org>

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-02-22 10:40:38 +00:00
John McLear ed8a8eb590
Rename lgtm.yml to .lgtm.yml 2021-02-22 10:06:13 +00:00
John McLear c6cd4c38fd
Update CHANGELOG.md 2021-02-22 09:46:14 +00:00
Richard Hansen d9c2778d17 plugins: Better fix for LGTM security warning 2021-02-22 09:43:20 +00:00
John McLear a102bbfbef
badges: color fix 2021-02-22 09:37:30 +00:00
John McLear b7958b915a
docs: Badge polish 2021-02-22 09:28:37 +00:00
John McLear 0f16e518ff
api: drop JSONP (#4835)
* api: drop JSONP

* docs: drop JSONP

* tests: drop JSONP

* api: remove isValidJSONPName require
2021-02-22 09:10:02 +00:00
Richard Hansen 85231cb774 tests: More descriptive Sauce Labs name 2021-02-22 03:36:12 -05:00
webzwo0i 2994ef3c3c tests: try all supported node versions 2021-02-22 03:36:12 -05:00
webzwo0i 29afb91b3e tests: delay setting up saucelabs tunnel 2021-02-22 03:36:12 -05:00
Richard Hansen 6198e92706 tests: Pass `--legacy-peer-deps` flag to work around npm v7 bug
This flag is unknown to npm v6, but npm v6 silently ignores unknown
flags.
2021-02-22 03:36:12 -05:00
Richard Hansen 588b73f366 tests: Install deps after installing plugins 2021-02-22 03:36:12 -05:00
Richard Hansen 5ea66701f7 tests: Use `--no-save` when installing plugins on Windows 2021-02-22 03:36:12 -05:00
webzwo0i 14a9749b75 tests: add assert helper for supporting node 10.x 2021-02-22 03:36:12 -05:00
John McLear ce83181ac3
Lgtm bugfixes (#4838)
* code tidy up: always evaluates

* tidy up: is always true

* tidy up: remove unused code

* always true/false variables

* unused variable

* tidy up: remove unused code in caretPosition.js

* for squash: Revert "tidy up: remove unused code in caretPosition.js"

The `if` condition was previously always true, so the body should be
preserved. If the body is preserved, other logic can be deleted. I
opened PR #4845 to clean it all up.

This reverts commit 75b03e5a7d.

* for squash: simplify

* for squash: Explain that the getter is used for its side effects

It's very weird to call a getter without using its return value. Add a
comment explaining why this is done so that the reader doesn't get
confused.

* for squash: Revert "tidy up: remove unused code"

The exception test was the purpose of the code.

This reverts commit 85153b1676.

* for squash: Log the tsort results

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-02-22 08:26:35 +00:00
Stefan de186fbe36
Update node in docker to version 14 (#4844) 2021-02-22 01:34:34 -05:00
John McLear 40d7480d5b lint: padaccess.js 2021-02-21 21:09:02 -05:00
John McLear 029729a386 lint: Settings.js 2021-02-21 21:09:02 -05:00
John McLear 435562299f lint: NodeVersion.js 2021-02-21 21:09:02 -05:00
John McLear 7352dc7571 lint: ImportEtherpad.js 2021-02-21 21:09:02 -05:00
John McLear 613c7d8545 lint: ExportTxt.js 2021-02-21 21:09:02 -05:00
John McLear d2359be08b lint: ExportHtml.js 2021-02-21 21:09:02 -05:00
John McLear 5718c8b360 lint: AbsolutePaths.js 2021-02-21 21:09:02 -05:00
John McLear b1614f0592 lint: i18n.js
Partial, still 3 more to do that are slightly higher hanging that can get done.
2021-02-21 21:09:02 -05:00
John McLear 586af5e16e lint: padurlsanitize.js 2021-02-21 21:06:38 -05:00
John McLear 86c938cae2 lint: openapi.js 2021-02-21 21:06:38 -05:00
John McLear 25d4faddd9 lint: SocketIORouter.js 2021-02-21 21:06:38 -05:00
John McLear 5201cb717f lint: PadMessageHandler.js 2021-02-21 21:06:38 -05:00
John McLear d67f170c46 lint: eejs/index.js 2021-02-21 21:06:38 -05:00
John McLear 3ed4ac649c lint: PadManager.js 2021-02-21 21:02:59 -05:00
John McLear 6b6201b448
null link on plugins and noopener / noreferrer
Resolves a (non) security issue brought up by LGTM but I think the noopener and norefferer are good shouts
2021-02-21 19:30:39 +00:00
John McLear 2c763fb4d1 Delete dirty-db-cleaner.py 2021-02-21 18:07:20 +00:00
John McLear 543e94fd4a
timeslider: slight improvement on code quality (#4836)
This is an interim patch, ultimately the JS needs to be thrown out of the HTML...
2021-02-21 17:59:15 +00:00
John McLear 1b8cd0747d
Move vendor libraries to /vendors folder and exclude from LGTM 2021-02-21 15:07:39 +00:00
webzwo0i 0bb3e65020 fix for caching plugin-definitions 2021-02-21 14:31:15 +00:00
John McLear bdb78adb3f Update CHANGELOG.md 2021-02-21 13:50:55 +00:00
John McLear 086b59b30d
editor: UI polish - Etherpad brand as reconnect & loading animation 2021-02-21 13:24:51 +00:00
Richard Hansen 6023117d29
CI: Use `saucelabs/sauce-connect-action` to create the tunnel (#4833) 2021-02-21 13:17:41 +00:00
John McLear bb14775820 drop apiRoot object from build 2021-02-21 11:08:07 +00:00
John McLear 227370547d update openapi-backend 2021-02-21 11:08:07 +00:00
John McLear ee2b32281c
pluginfw: Warn plugins on missing plugin (#4826)
* pluginfw: Warn plugins on missing plugin

Add functionality to console.warn when a plugin is missing.  This will help admins know when people are trying to use plugins that are missing.  Resolves https://github.com/ether/etherpad-lite/issues/4730

* pluginfw: importing .etherpad can notify admins of missing plugins

Extending .etherpad imports to notify admins if a missing plugin is present

* Update ImportEtherpad.js
2021-02-21 11:07:13 +00:00
John McLear 77b2f372ab lint: pad_userlist.js arrow functions
This probably needs a good rewrite/refactor to remove self.
2021-02-21 11:05:25 +00:00
John McLear 2511eed472 lint: Changeset.js more literal conditionals 2021-02-21 11:05:25 +00:00
John McLear 8cbd5222dd lint: pad_userlist.js - remove require browser 2021-02-21 11:05:25 +00:00
John McLear 73b3a2dc54 lint: AttributeManager.js use ES6 method for hasAttrib 2021-02-21 11:05:25 +00:00
John McLear f86578ffc3 lint: changesettracker.js var > const/let and other easy fixes 2021-02-21 11:05:25 +00:00
John McLear 3635cb6ca6 lint: changesettracker.js long-lines 2021-02-21 11:05:25 +00:00
John McLear f5f4e3a6d1 lint: changesettracker.js arrow funcs 2021-02-21 11:05:25 +00:00
John McLear d4b6cbc897 line: broadcast.js 2021-02-21 11:05:25 +00:00
John McLear 3b5b996d84 lint: Changeset no var 2021-02-21 11:05:25 +00:00
John McLear 0b78ad2f90 lint: Changeset.js curly braces in correct position 2021-02-21 11:05:25 +00:00
John McLear 23d7544763 lint: Changeset.js max-len 2021-02-21 11:05:25 +00:00
John McLear 98a0e76a20 lint: Changeset.js opcode eqeqeq checks 2021-02-21 11:05:25 +00:00
John McLear d91f2b5b07 lint: Changeset.js additional arrow functions 2021-02-21 11:05:25 +00:00
John McLear acccf56724 lint: Changeset.js arrow-functions 2021-02-21 11:05:25 +00:00
John McLear cf37f52093 lint: collab_client.js 2021-02-21 11:05:25 +00:00
John McLear b029edb931 lint: index.js 2021-02-21 11:05:25 +00:00
John McLear 01dd004054 lint: ChangesetUtils 2021-02-21 11:05:25 +00:00
John McLear 7c51446040 lint: use strict 2021-02-21 11:05:25 +00:00
John McLear c64b1b8ead lint: skins 2021-02-21 11:05:25 +00:00
Sebastian Castro 4ca2d7ea3a
include lineHeight property in sidebar elements (#4831)
This also makes the full line number element clickable to ensure a positive UX for the ``?lineNumber`` URL endpoint.  It also makes it more obvious that a click action can happen based on the hover.

Make line numbers stick to baseline of first line of wrapped content and editor lines with increased line hieght.

Make it compatible with ep_author_neat
2021-02-20 13:24:17 +00:00
John McLear 08d2024caf
docs: badges
Badges into the README.md to show code quality, engagement etc.
2021-02-20 13:22:23 +00:00
John McLear 7e86acad8f
CI: Build and test Windows .zip (#4828) 2021-02-20 04:13:44 -05:00
Richard Hansen 4d50813c94
issue templates: Ask for server info when opening a bug 2021-02-19 02:51:15 -05:00
snyk-bot d5997ddf05 fix: upgrade log4js from 0.6.35 to 0.6.38
Snyk has created this PR to upgrade log4js from 0.6.35 to 0.6.38.

See this package in npm:
https://www.npmjs.com/package/log4js

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-18 21:13:08 +00:00
Richard Hansen 6163339c0d plugins: Always install plugins with `--no-save`
The npm CLI can get confused if `package.json` or `package-lock.json`
exist.
2021-02-18 19:18:59 +00:00
Richard Hansen b3b5af3c3c plugins: Use `npm` CLI to install/uninstall plugins
Using npm as a module has long been discouraged and will stop working
with npm v7.
2021-02-18 19:18:59 +00:00
Richard Hansen 9633b98f92 tests: Delete unnecessary use of `npm` package 2021-02-18 19:18:59 +00:00
Richard Hansen 1cfbf88f7c run_cmd: Enhance with ability to return stdout as string 2021-02-18 19:18:59 +00:00
Richard Hansen d8bb5aa009 plugins: Eliminate unnecessary `run_npm.js`
I had anticipated more shared logic than we actually need (the
abstraction in `run_npm.js` is YAGNI).
2021-02-18 19:18:59 +00:00
Richard Hansen 426c025127 run_cmd: Log to Etherpad logs by default 2021-02-18 19:18:59 +00:00
Richard Hansen 689a75b381 plugins: Pass `--no-production` instead of setting `NODE_ENV=development` 2021-02-18 19:18:59 +00:00
Richard Hansen dcf7891316 plugins: Improve logging of plugin events
This will make it easier to troubleshoot plugin and npm issues.
2021-02-18 19:18:59 +00:00
Richard Hansen 4253a2ea8f plugins: Move hook call and plugin update out of try block
Exceptions thrown by these function calls are serious and should crash
Etherpad.
2021-02-18 19:18:59 +00:00
Richard Hansen a8479e4a0e lint: Fix some ESLint errors in pluginfw 2021-02-18 19:18:59 +00:00
Richard Hansen a45e85a730 Use `settings.root` to anchor pathnames 2021-02-18 19:18:59 +00:00
Richard Hansen f868788417 Remove unnecessary `path.normalize()` calls
`path.join()` already normalizes.
2021-02-18 19:18:59 +00:00
Richard Hansen 84c1d74f8b server: Fix Gate constructor
The ECMAScript spec for `.then()` requires Promise subclass
constructors to take an executor.
2021-02-18 19:18:34 +00:00
Richard Hansen 4c6cb53d18 server: Improve log messages when exiting 2021-02-18 19:18:34 +00:00
snyk-bot 449b03d7e8 fix: upgrade unorm from 1.4.1 to 1.6.0
Snyk has created this PR to upgrade unorm from 1.4.1 to 1.6.0.

See this package in npm:
https://www.npmjs.com/package/unorm

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-18 19:18:19 +00:00
John McLear 9fb2c640b9
tests: Microsoft Windows Server CI (#4791)
Due to a recent release that wasn't functioning properly this CI will help us catch the majority of Microsoft Node Quirks before they make it into a release.
2021-02-18 18:49:43 +00:00
John McLear 13e4451c2b
Merge branch 'master' into develop 2021-02-18 14:37:08 +00:00
John McLear 65867eb895
Merge branch 'develop' 2021-02-18 14:37:06 +00:00
John McLear 9f317f0798
bump version 2021-02-18 14:37:02 +00:00
snyk-bot 19bf97bd2d fix: upgrade formidable from 1.2.1 to 1.2.2
Snyk has created this PR to upgrade formidable from 1.2.1 to 1.2.2.

See this package in npm:
https://www.npmjs.com/package/formidable

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-18 14:02:56 +00:00
snyk-bot a380fc2abf fix: upgrade tinycon from 0.0.1 to 0.6.8
Snyk has created this PR to upgrade tinycon from 0.0.1 to 0.6.8.

See this package in npm:
https://www.npmjs.com/package/tinycon

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-18 13:45:18 +00:00
snyk-bot da65057bb1 fix: upgrade etherpad-yajsml from 0.0.2 to 0.0.4
Snyk has created this PR to upgrade etherpad-yajsml from 0.0.2 to 0.0.4.

See this package in npm:
https://www.npmjs.com/package/etherpad-yajsml

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-18 04:33:40 -05:00
Ole Langbehn 24c1639f11
feat(docker): Add build var for optionally installing abiword (#4796)
This MR introduces a docker build variable `INSTALL_ABIWORD`. When set
to any value other than `0`, ABIWORD is installed in the resulting
docker container, enabling the possibility to configure ABIWORD in
settings.json.docker or via ENV VAR `ABIWORD` for exporting to
DOC/PDF/ODT.

Documentation is included inline and in the docker markdown file.
2021-02-18 04:27:52 -05:00
Richard Hansen 63e876f53d docs: Start CHANGELOG for 1.8.9 2021-02-18 03:56:41 -05:00
Richard Hansen 30dbdf29f4 import: Convert arrow function to regular function
This fixes a bug introduced in commit
b711ff6acf. Some time between when that
commit was originally written and when it was merged a round of
linting had converted the function from a regular function to an arrow
function because `this` was never in the body of the function. When I
rebased the commit, which introduced `this` to the body, I didn't
catch the error.
2021-02-18 03:42:56 -05:00
Richard Hansen fb745374c3 import: Improve error logging 2021-02-18 03:42:41 -05:00
Richard Hansen 22a67c5dc6 windows: Fix path to `server.js` in `start.bat` 2021-02-17 22:32:36 +00:00
John McLear 29f2cd34f0 build: fix build path for windows 2021-02-17 20:38:10 +00:00
Richard Hansen 8ef0860e8b
tests: Restore `runnerBackend.sh` (#4803)
* tests: Restore `runnerBackend.sh`

`runnerBackend.sh` was deleted in commit
7dae5e3db8 but plugins still need it
until their GitHub workflow definitions have been updated.

Co-authored-by: John McLear <john@mclear.co.uk>
2021-02-17 04:35:57 -05:00
Richard Hansen 7dae5e3db8 tests: Use the supertest agent from `common.js` for backend tests 2021-02-16 21:13:35 -05:00
Richard Hansen 5a91cf1b49 tests: Disable rate limiting for backend tests 2021-02-16 21:13:35 -05:00
Richard Hansen 4ae8fbc40d tests: Increase `importexportGetPost.js` timeouts
The tests were timing out on my machine.
2021-02-16 21:13:35 -05:00
Richard Hansen 3d2f77f75d lint: Fix ESLint errors in backend tests 2021-02-16 21:13:35 -05:00
Richard Hansen 00d45e3229 Defer rate limiter creation to a hook call
This makes it possible to change the rate limiter settings via
`/admin/settings` or by modifying the appropriate settings object and
reinvoking the hook.
2021-02-16 21:13:35 -05:00
Richard Hansen d7ed71eba0 plugins: Fix "Error: spawn npm ENOENT" error on Windows
On Windows, npm should be invoked as `npm.cmd`, not `npm`. Use a
drop-in replacement for `child_process.spawn()` that does the right
thing on Windows.
2021-02-16 22:00:20 +00:00
John McLear 2e92e8e9d0 tests: frontend test button increase timeouts 2021-02-16 16:38:59 +00:00
snyk-bot b06e47c06e fix: src/bin/doc/package.json & src/bin/doc/package-lock.json to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-MARKED-584281
2021-02-16 11:10:46 +00:00
snyk-bot 095edb5043 fix: upgrade express-rate-limit from 5.1.1 to 5.2.3
Snyk has created this PR to upgrade express-rate-limit from 5.1.1 to 5.2.3.

See this package in npm:
https://www.npmjs.com/package/express-rate-limit

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-16 11:05:49 +00:00
Richard Hansen c39d0606cf ace2_inner: Delete special arrow key handling
I can't see any reason this would be necessary, and it appears to not
behave as intended (`scroll.scrollWhenPressArrowKeys()` is not invoked
after a continuously held arrow key is finally let up).
2021-02-16 11:03:31 +00:00
Richard Hansen 72704a9fbd release: Update the `doc/latest` symlink 2021-02-16 10:37:07 +00:00
Richard Hansen 345f5227fd release: Use log4js to improve message readability 2021-02-16 10:37:07 +00:00
Richard Hansen 899f2e02f3 release: Reset Git repo on error 2021-02-16 10:37:07 +00:00
Richard Hansen ba32f71f30 release: Automate more steps 2021-02-16 10:37:07 +00:00
Richard Hansen 18c8838a33 release: Stricter checking of `CHANGELOG.md` 2021-02-16 10:37:07 +00:00
Richard Hansen 5c48ebb406 release: Fix wrapping of log message 2021-02-16 10:37:07 +00:00
Richard Hansen 5816fd5f2f release: Add git sanity checks 2021-02-16 10:37:07 +00:00
Richard Hansen a814893ca3 release: Assume `../ether.github.com` exists 2021-02-16 10:37:07 +00:00
Richard Hansen 8db6b5da4a release: Don't capture stdout when unnecessary
This should make it easier to troubleshoot issues.
2021-02-16 10:37:07 +00:00
Richard Hansen 83b55eb41f release: Shorthand function for running a command 2021-02-16 10:37:07 +00:00
Richard Hansen 2691d556fe release: Enforce lockfileVersion 1 2021-02-16 10:37:07 +00:00
Richard Hansen 1ada0ab5d6 release: cd to Etherpad root directory 2021-02-16 10:37:07 +00:00
Richard Hansen 565d020876 release: Make sure JSON ends with `\n` 2021-02-16 10:37:07 +00:00
Richard Hansen ea4b2ef8fb release: Factor out JSON read/write for later reuse 2021-02-16 10:37:07 +00:00
Richard Hansen 8155d6154d release: Don't create `release/x.y.z` branch
Patch-specific release branches should never diverge from the tag, so
they serve no useful purpose. (If they do diverge, which some did
before I deleted them all, what does it mean? Are we going to move the
tag in the future? It's just too confusing.)

In the future we might want to do major- or minor-specific
branches (e.g., `release/1` or `release/1.8`), but only if we want to
maintain old releases. For example, if 2.0 is a major release that
doesn't work with plugins designed for 1.x we might want to maintain a
`release/1` branch that continues to get bugfixes while the bulk of
new work continues to land on `develop`. If we do decide to maintain
old releases we'll need a new set of release scripts (or edit the
`release.js` script on the `release/1` branch).
2021-02-16 10:37:07 +00:00
John McLear e1dcaa5210 release: Better steps for release procedure 2021-02-16 10:37:07 +00:00
John McLear 655ae90464 release: Exclude `var/` during Windows build 2021-02-16 10:37:07 +00:00
Richard Hansen d5969507cd release: Clone docs repo in `..` 2021-02-16 10:37:07 +00:00
Richard Hansen bdd32f8915 Replace `node_modules/ep_etherpad-lite` with `src` 2021-02-16 10:35:05 +00:00
snyk-bot 269c6d09c5 fix: upgrade npm from 6.14.8 to 6.14.11
Snyk has created this PR to upgrade npm from 6.14.8 to 6.14.11.

See this package in npm:
https://www.npmjs.com/package/npm

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-15 18:35:59 -05:00
snyk-bot ed02606c4b
fix: upgrade semver from 5.6.0 to 5.7.1
Snyk has created this PR to upgrade semver from 5.6.0 to 5.7.1.

See this package in npm:
https://www.npmjs.com/package/semver

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-15 21:54:50 +00:00
Richard Hansen f0a6236a0d Merge branch 'master' into develop 2021-02-15 12:47:47 -05:00
Richard Hansen 113df1f186 Merge branch 'develop' 2021-02-15 12:47:33 -05:00
John McLear c0f73e6672 bump version 2021-02-15 12:47:20 -05:00
John McLear 306e839bd8 docs: security notification 2021-02-15 12:45:31 -05:00
John McLear b7e88cb904 security: New setting for Socket.IO `maxHttpBufferSize` 2021-02-15 12:45:31 -05:00
Richard Hansen ed93ef5636 /admin/settings: Reload plugins, call `loadSettings` hook on restart
This should match the normal startup procedure a bit more closely.
2021-02-15 08:43:14 +00:00
Guilherme Goncalves 3ff244f7a0 Update lines with zero height on sidediv
Avoid evaluation of `0` height as false within `if` condition,
since it is possible having 0px as line-height.
2021-02-15 00:42:00 -05:00
Egil 9c7dcb1d0a eejs: Upgrade ejs to the latest version
The type of ejs's `__output` variable is now string instead of array
of strings, so the handling of `__output` had to change.
2021-02-14 23:36:53 -05:00
John McLear 615e47114b Revert "socketio: increase socketio limit to 1MiB"
This reverts commit 55c96e5577.
2021-02-14 16:53:48 +00:00
Richard Hansen 648e7c7342 docs: Mention improved import UX in `CHANGELOG.md` 2021-02-14 03:58:53 -05:00
Richard Hansen b711ff6acf import: Ajaxify pad import
This eliminates an inline script (good for Content Security Policy)
and improves the user experience.
2021-02-14 08:35:38 +00:00
Richard Hansen fba55fa6cf ImportHandler: Refactor `doImport()` for readability 2021-02-14 08:35:38 +00:00
Richard Hansen 28b28866a2 ImportHandler: Move the logger up
Also change the name to something shorter.
2021-02-14 08:35:38 +00:00
Richard Hansen 26b5a69ccc ImportHandler: Use `JSON.stringify()` to properly escape characters 2021-02-14 08:35:38 +00:00
Richard Hansen ed80883709 ImportHandler: Lint the response script sent to the browser 2021-02-14 08:35:38 +00:00
Richard Hansen 0ff131bbbb ImportHandler: Throw Errors, not strings 2021-02-14 08:35:38 +00:00
Richard Hansen 908635a1de ImportHandler: Use `return reject(...)` to avoid double settle 2021-02-14 08:35:38 +00:00
Richard Hansen e01059dce5 ImportHandler: Switch to `fs/promises` API 2021-02-14 08:35:38 +00:00
Richard Hansen 5b1b030906 ImportHandler: Use asynchronous rename instead of `fs.renameSync()` 2021-02-14 08:35:38 +00:00
Richard Hansen c7b1abebe4 ImportHandler: Avoid deprecated `fs.exists()` function 2021-02-14 08:35:38 +00:00
Richard Hansen 008209b0e0 ImportHandler: Delete redundant variable 2021-02-14 08:35:38 +00:00
Richard Hansen cc52811cd0 pad_impexp: Use jQuery to build the import failure popup
This reduces the chances of accidentally introducing an XSS
vulnerability.
2021-02-14 08:35:38 +00:00
Richard Hansen d869d96a2b pad_impexp: Simplify creation of import failure message 2021-02-14 08:35:38 +00:00
Richard Hansen 890e16f6fc pad_impexp: Style fixes to improve readability 2021-02-14 08:35:38 +00:00
Richard Hansen efe07cd027 pad_impexp: Invert logic to improve readability 2021-02-14 08:35:38 +00:00
Richard Hansen ce4ce8ce95 pad_impexp: Delete unnecessary `importFailed` wrapper 2021-02-14 08:35:38 +00:00
Richard Hansen 8a221ca773 pad: Delete dead code 2021-02-14 08:35:38 +00:00
Richard Hansen 48205c1ddb import/export: Make sure Express sees async errors
Express v4.x does not check to see if a Promise returned from a
middleware function will be rejected, so explicitly pass the Promise
rejection reason to `next()`.

We can revert this change after we upgrade to Express v5.0.

See https://expressjs.com/en/guide/error-handling.html for details.
2021-02-14 08:35:38 +00:00
John McLear f59e0993a6
tests: test runner output HTML and CSS improvements to show duration (#4775) 2021-02-14 08:04:50 +00:00
Richard Hansen e674d9789e
express: Change `httpUptime` to `httpStartTime` (#4777)
It's better to provide a primitive value and let the consumer of the
metric do math if desired.

Co-authored-by: John McLear <john@mclear.co.uk>
2021-02-14 07:50:10 +00:00
John McLear 13a0b0688f
docs: changelog update (#4776)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-02-14 01:16:41 -05:00
John McLear e585d321f9
tests: timeouts for tests (#4773) 2021-02-13 19:00:06 +00:00
Richard Hansen f9ec49d7ac tests: Improve `/admin/settings` restart test 2021-02-13 10:02:28 +00:00
Richard Hansen ac52fb8a9d express: New `httpUptime` metric 2021-02-13 10:02:28 +00:00
John McLear e22d8dffc0 deps: use ci --no-optional flags, this might break some things as it requires npm 6.31.4 2021-02-13 10:01:36 +00:00
John McLear 483f4344c2
performance: maxAge for favicon and plugin definitions (#4761) 2021-02-13 08:13:48 +00:00
Richard Hansen 09e9c36098 tests: Accept async condition functions for `helper.waitFor()` 2021-02-13 08:12:53 +00:00
Richard Hansen 8dca4cb16f tests: Give `helper.waitFor()` timeout errors a useful stack trace 2021-02-13 08:12:53 +00:00
Richard Hansen 71c1899164 tests: Asyncify tests in `api.js` 2021-02-13 08:12:53 +00:00
Richard Hansen e0f499cf5a tests: Use the supertest agent from `common.js` for `api.js` 2021-02-13 08:12:53 +00:00
Richard Hansen 08124ba733 tests: Delete unnecessary `describe()` calls in `api.js` 2021-02-13 08:12:53 +00:00
Richard Hansen fc9b22475a tests: Always call backend `common.init()` at startup
This provides a place to set the timeout for `common.init()` so that
individual tests don't have to.
2021-02-13 08:12:53 +00:00
Richard Hansen 6953e40c75 tests: Wait for `common.init()` to complete before returning 2021-02-13 08:12:53 +00:00
Richard Hansen 1c8a913411 lint: Delete unnecessary `eslint-disable-line` comment 2021-02-13 08:12:53 +00:00
Richard Hansen d56a02c85a express: Forcibly terminate HTTP connections when restarting
This should make restarts via `/admin` actions (e.g., plugin
installation) more reliable.
2021-02-13 07:37:22 +00:00
John McLear 4c4c7b526d
performance: i18n maxage (#4759) 2021-02-13 02:35:25 -05:00
Richard Hansen 01c83917d1 socket.io: Manually track client connections/disconnections
This change is required for socket.io 3.x because in 3.x
`io.sockets.clients()` no longer returns all client Socket objects.
2021-02-13 07:13:37 +00:00
Richard Hansen 66544be354 lint: `src/tests/backend/specs/api/api.js` 2021-02-13 00:46:30 -05:00
Richard Hansen eb9d5bb470 lint: `src/tests/frontend/helper.js` and friends 2021-02-13 00:46:30 -05:00
Richard Hansen 8f2f6593be lint: Re-run `eslint --fix` 2021-02-13 00:31:36 -05:00
Richard Hansen db8ca2818f lint: Treat `helper.js` and friends as normal browser files
This enables the prefer-arrow/prefer-arrow-functions rule.
2021-02-13 00:29:30 -05:00
John McLear bcd5e36688 tests: backend and frontend tests for image upload 2021-02-12 18:00:47 -05:00
John McLear 55c96e5577 socketio: increase socketio limit to 1MiB 2021-02-12 17:56:50 -05:00
John McLear fcd9adf20d
tests: admin test timeout increase, bugfix and removal of buggy test (#4762) 2021-02-12 20:04:42 +00:00
Richard Hansen 73d31b12a8 Minify: Replace deprecated `url.parse()` with `new URL()` 2021-02-12 07:08:51 +00:00
Richard Hansen 7efca7dc7d Minify: Don't ignore request headers in `requestURI()` 2021-02-12 07:08:51 +00:00
Richard Hansen 7a003cb9e2 Minify: Let Express render the 500 error page 2021-02-12 07:08:51 +00:00
Richard Hansen 44e420b6c5 Minify: Return `Date` objects from `statFile()` 2021-02-12 07:08:51 +00:00
Richard Hansen aa11667ff7 Minify: Use `fs.promises` 2021-02-12 07:08:51 +00:00
Richard Hansen 073052ac66 Minify: Asyncify `minify()` 2021-02-12 07:08:51 +00:00
Richard Hansen 3eefe71834 Minify: Don't set cache headers if `statFile()` causes 500 2021-02-12 07:08:51 +00:00
Richard Hansen 84190793dc Minify: Asyncify `getFileCompressed()` 2021-02-12 07:08:51 +00:00
Richard Hansen dd7ea1a8f9 Minify: Asyncify `statFile()` 2021-02-12 07:08:51 +00:00
Richard Hansen 947dc8eeed Minify: Asyncify `getFile()` 2021-02-12 07:08:51 +00:00
Richard Hansen 5d7c07e81c Minify: Asyncify `lastModifiedDateOfEverything()` 2021-02-12 07:08:51 +00:00
Richard Hansen e573276755 Minify: Asyncify `getAceFile()` 2021-02-12 07:08:51 +00:00
Richard Hansen 5cc191f185 Minify: Replace `async.forEach()` with `Promise.all()` 2021-02-12 07:08:51 +00:00
Richard Hansen 0c428e068e Minify: Use `Promise.all()` to simplify `requestURIs()` 2021-02-12 07:08:51 +00:00
Richard Hansen 1ec29e0d45 Minify: Asyncify `requestURI()` 2021-02-12 07:08:51 +00:00
Richard Hansen a952df2cf5 Minify: Un-export `requestURI()`
Nobody outside this file uses it.
2021-02-12 07:08:51 +00:00
Richard Hansen d9607f7c66 static: Asyncify 2021-02-12 07:08:51 +00:00
Richard Hansen 7f4a7156e2 Minify: Move `getTar()` to `static.js`
`static.js` is the only file that uses it.
2021-02-12 07:08:51 +00:00
Richard Hansen 996dc81825 Minify: Move tar processing into a function
This reduces the overhead of `require()`ing the module, and it will
make it easier for a future commit to asyncify everything in
`Minify.js`.
2021-02-12 07:08:51 +00:00
Richard Hansen 8ae8710a14 ace: Fix EMBEDDED check 2021-02-12 07:08:51 +00:00
Richard Hansen 50929fe7f7 express: Call expressConfigure, expressCreateServer hooks asynchronously 2021-02-12 07:08:51 +00:00
Richard Hansen 8919f63c98 lint: Replace use of underscore.js with plain ECMAScript 2021-02-12 07:08:51 +00:00
John McLear ab127289c4 security: limit socketio to 1M chars 2021-02-11 21:01:47 -05:00
Richard Hansen 085ab452a0 chat tests: Give some time to process each of the 140 chat messages
This avoids overflowing socket.io's receive buffer.
2021-02-11 21:01:47 -05:00
Richard Hansen 020df75677 chat tests: Asyncify 2021-02-11 21:01:47 -05:00
Richard Hansen 0fae34009d chat tests: Delete unnecessary `expect()` 2021-02-11 21:01:47 -05:00
snyk-bot f6df9ffad0 fix: upgrade measured-core from 1.11.2 to 1.51.1
Snyk has created this PR to upgrade measured-core from 1.11.2 to 1.51.1.

See this package in npm:
https://www.npmjs.com/package/measured-core

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-11 18:39:08 +00:00
John McLear cc7f11560f
Fix OL list items not increasing (#4749)
* tests: additional test coverage for OL items

* parseInt means we can do a proper check

* tests: use ol check value test for #4748
2021-02-11 13:26:37 -05:00
snyk-bot 60a55ec428 fix: upgrade resolve from 1.1.7 to 1.19.0
Snyk has created this PR to upgrade resolve from 1.1.7 to 1.19.0.

See this package in npm:
https://www.npmjs.com/package/resolve

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-11 18:24:32 +00:00
snyk-bot b50fcb065a fix: upgrade underscore from 1.8.3 to 1.12.0
Snyk has created this PR to upgrade underscore from 1.8.3 to 1.12.0.

See this package in npm:
https://www.npmjs.com/package/underscore

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-02-11 18:18:11 +00:00
translatewiki.net 2f1d648787 Localisation updates from https://translatewiki.net. 2021-02-11 18:48:51 +01:00
Richard Hansen 2301c6ec83 pad: Don't throw on socket.io error 2021-02-11 17:25:09 +00:00
Richard Hansen fc9f236977 plugins: Use `npm ls` to list the installed plugins
This speeds up startup considerably, and we get rid of a lot of buggy
code.

This works with both npm v6.x and v7.x.
2021-02-09 22:18:35 +00:00
Richard Hansen ce1b69feda plugins: Helper function to run the `npm` CLI 2021-02-09 22:18:35 +00:00
Richard Hansen 87341af429 GitHub workflows: Install Node.js v12
I'm not sure how these tests ever worked. I guess some version of
Node.js and npm come pre-installed on the ubuntu-latest images?

I would have prefered to use Node.js v10 because that is our current
minimum supported version, but we have a surprising number of tests
that don't work on Node.js v10 (mostly due to `assert.match()`, which
was added in Node.js v12).
2021-02-09 22:18:35 +00:00
Richard Hansen 83a519941b /admin/plugins: Fix logging of error messages 2021-02-09 22:18:35 +00:00
John McLear 94a65062c7
checkPlugins: remove lib/travis.yml and add github badges if they aren't present (#4731)
A future PR should remove all Travis badges and CI jobs.
2021-02-09 09:41:41 +00:00
Richard Hansen ebdb2798ff server: Fix handling of errors during startup and shutdown
Before, an unhandled rejection or uncaught exception during startup
would cause `exports.exit()` to wait forever for startup completion.
Similarly, an error during shutdown would cause `exports.exit()` to
wait forever for shutdown to complete. Now any error during startup or
shutdown triggers an immediate exit.
2021-02-09 08:57:24 +00:00
Richard Hansen 5999d8cd44 server: Only pass `err` arg to `exports.exit()`
The `uncaughtException` event handlers are passed two arguments: error
and "origin". The `exports.exit()` argument doesn't expect a second
argument.
2021-02-09 08:57:24 +00:00
Richard Hansen 5b327b63ac server: Simplify gating of state transition waiters 2021-02-09 08:57:24 +00:00
Richard Hansen 105f8b0ccb server: Use a log4js logger object for logging 2021-02-09 08:57:24 +00:00
Richard Hansen cb1116607e Revert "backend tests: change loglevel to WARN (#4514)"
Logging verbosity of the openapi handlers was turned down so GitHub
should be happier with INFO now. This makes it easier to troubleshoot
problems.

This reverts commit b98aaf4904.
2021-02-09 07:24:31 +00:00
Richard Hansen 1e3f352281 openapi: Turn down logging verbosity 2021-02-09 07:24:31 +00:00
Richard Hansen 714e099b2a tests: Fix accidental functions in `ordered_list.js`
This fixes a bug introduced in commit
e9bb2c410e.
2021-02-09 07:23:38 +00:00
Ole Langbehn 4c6a12ce2b Add commitRateLimiting settings block to settings.json.docker
The settings commitRateLimiting.duration and commitRateLimiting.points
were not available in the settings.json.docker file, and therefore it
was not possible to override their values via environment variables.

Now, they can be overridden by setting the following env vars:

* commitRateLimiting.duration: COMMIT_RATE_LIMIT_DURATION
* commitRateLimiting.points:   COMMIT_RATE_LIMIT_POINTS
2021-02-08 19:19:03 +00:00
Richard Hansen e9bb2c410e tests: Fix erroneous use of `waitForPromise()` in `ordered_list.js`
`waitForPromise()` should always be used with `await` (either directly
or with a later `await` on the returned Promise). In this case,
the condition should be immediately true so `waitForPromise()` is not
the right tool here.
2021-02-08 18:24:11 +00:00
John McLear 7baa0cda02
tests: disabled checks shouldnt change behavior (#4729) 2021-02-08 11:07:07 +00:00
John McLear 9070c71e9f color picker: allow full white 2021-02-08 11:01:27 +00:00
John McLear 5d96cf9754
changelog 1.8.8 (#4725)
* changelog 1.8.8

* for squash: refine changelog

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-02-07 22:24:19 +00:00
Richard Hansen 1c9afa5168 lint: src/static/js/ace.js 2021-02-07 20:04:07 +00:00
Richard Hansen 8668017c62 ace: Use `globalThis` instead of non-strict default context
This is necessary before `'use strict';` can be added to the top of
the file.
2021-02-07 20:04:07 +00:00
Richard Hansen 3c2e0f0e16 ace: Simplify Ace2Editor method creation
* Delete the unused `optDoNow` parameter from `pendingInit()`.
  * Move the `setAuthorInfo()` 1st parameter check out of the wrapper
    and in to the `setAuthorInfo()` function itself.
2021-02-07 20:04:07 +00:00
John McLear 865a463154 fix: release script output 2021-02-07 19:28:00 +00:00
John McLear 2b112ac851
tests: Admin Frontend Test Coverage(#4717)
Covers all frontend admin operations, runs separated in CI.
2021-02-07 11:32:57 +00:00
Richard Hansen 294f2a251f lint: Fix bugs and style issues introduced in PR #4718
This fixes issues introduced in commit
f8a19c4527.
2021-02-07 07:51:35 +00:00
Richard Hansen 0ff8274d2e tests: Fix `waitForPromise()` in `enter.js` 2021-02-07 07:13:04 +00:00
Richard Hansen c625c611d2 tests: delete `src/tests/frontend/specs/caret.js`
All of the tests in this file are commented out so this file does
nothing. We can uncomment the code and clean it up, but the approach
taken in these tests will never work: For security reasons, browsers
do not allow synthetic key events to perform the default
behavior (such as moving the carent when an arrow key is pressed).

There are two ways to test responses to navigation keys:
  * Use WebDriver to create "genuine" keyboard events.
  * Suppress the default behavior and implement caret movement
    ourselves. This is tremendously complicated, especially arrow
    up/down.
2021-02-07 07:02:23 +00:00
John McLear 1f0cb01110 tests: fix enter test 2021-02-07 07:00:12 +00:00
John McLear f8a19c4527
lint: lint and various fixes of frontend test specs 2021-02-07 06:39:03 +00:00
Richard Hansen da10d42183 Delete top-level `package.json`
Advantages of a top-level `package.json`:
  * It prevents npm from printing benign warnings about missing
    `package.json` whenever a plugin is installed.
  * Semantically, it is "the right thing to do" if plugins are to be
    installed in the top-level directory. This avoids violating
    assumptions various tools make about `package.json`, which makes
    it more likely that we can easily switch to a new version of npm
    or to an npm alternative.

Disadvantages of a top-level `package.json`:
  * Including a dependency of `ep_etherpad-lite@file:src` in the
    top-level `package.json`, which is required to keep npm from
    deleting the `node_modules/ep_etherpad-lite` symlink each time a
    package is installed, drastically slows down plugin installation
    because npm recursively walks the ep_etherpad-lite dependencies.
  * npm has a horrible dependency hoisting behavior: It moves
    dependencies from `src/node_modules/` to the top-level
    `node_modules/` directory when possible. This causes numerous
    mysterious problems, such as silent failures in `npm outdated` and
    `npm update`, and it breaks plugins that do
    `require('ep_etherpad-lite/node_modules/foo')`.

Right now, with npm v6.x, eliminating the disadvantages is far more
valuable than keeping the advantages. (This might change with npm
v7.x.)

For a long time there was no top-level `package.json` and it worked
fairly well, although users were often confused by npm's benign
warnings. The top-level `package.json` was added because we needed a
place to put ESLint config for the stuff in `bin/` and `tests/`, and
we wanted the advantages listed above. Unfortunately we were unaware
of the disadvantages at the time. The `bin/` and `tests/` directories
were moved under `src/` so we no longer need the top-level
`package.json` for ESLint.

An alternative to a top-level `package.json`: Create
`plugins/package.json` and install all plugins in `plugins/`. If
`plugins/package.json` has a dependency of
`ep_etherpad-lite@file:../src` then plugin installation will still be
slow (npm will still recursively walk the dependencies in
`src/package.json`) but it should avoid npm's nasty dependency
hoisting behavior. To avoid slow plugin installation we could create a
lightweight `etherpad-pluginlib` package that Etherpad plugins would
use to indirectly access Etherpad's internals. As an added bonus, this
intermediate package could become an adaptor that provides a stable
interface to plugins even when Etherpad core rapidly evolves.
2021-02-07 06:24:52 +00:00
John McLear e02246641e
ordered lists bugfix: first line item can be 0.*, don't show 0 as undefined (#4600) 2021-02-06 20:19:05 +00:00
John McLear 4862d6fa9c
editor: fix enter key keep line in view (#4639) 2021-02-06 19:56:59 +00:00
John McLear c969ae58c2
stats: activePads & lastDisconnected stats 2021-02-06 19:53:52 +00:00
John McLear 5f58ce14d6
editor: remove grayed logic and styles so background color is not lost on disconnect/reconnect. 2021-02-06 09:58:10 +00:00
Richard Hansen 8b28e00784 restructure: Prefix `bin/` and `tests/` with `src/`
This is a follow-up to commit
2ea8ea1275.
2021-02-05 21:52:08 +00:00
John McLear 2ea8ea1275 restructure: move bin/ and tests/ to src/
Also add symlinks from the old `bin/` and `tests/` locations to avoid
breaking scripts and other tools.

Motivations:

  * Scripts and tests no longer have to do dubious things like:

        require('ep_etherpad-lite/node_modules/foo')

    to access packages installed as dependencies in
    `src/package.json`.

  * Plugins can access the backend test helper library in a non-hacky
    way:

        require('ep_etherpad-lite/tests/backend/common')

  * We can delete the top-level `package.json` without breaking our
    ability to lint the files in `bin/` and `tests/`.

    Deleting the top-level `package.json` has downsides: It will cause
    `npm` to print warnings whenever plugins are installed, npm will
    no longer be able to enforce a plugin's peer dependency on
    ep_etherpad-lite, and npm will keep deleting the
    `node_modules/ep_etherpad-lite` symlink that points to `../src`.

    But there are significant upsides to deleting the top-level
    `package.json`: It will drastically speed up plugin installation
    because `npm` doesn't have to recursively walk the dependencies in
    `src/package.json`. Also, deleting the top-level `package.json`
    avoids npm's horrible dependency hoisting behavior (where it moves
    stuff from `src/node_modules/` to the top-level `node_modules/`
    directory). Dependency hoisting causes numerous mysterious
    problems such as silent failures in `npm outdated` and `npm
    update`. Dependency hoisting also breaks plugins that do:

        require('ep_etherpad-lite/node_modules/foo')
2021-02-04 17:15:08 -05:00
John McLear efde0b787a
npm-load-remove: checkPad.js example (#4711)
* npm-load-remove: checkPad.js example

* npm-load-remove: checkPad.js example

* npm-load-remove: checkPad.js example

* npm-load-remove: checkPad.js example

* npm-load-remove: checkPad.js example

* npm-load-remove: checkPad.js example

* npm-load-remove: checkPadDeltas

* npm-load-remove: extractPadData

* npm-load-remove: importSqlFile

* npm-load-remove: rebuildPad

* npm-load-remove: repairPad

* npm-load-remove: checkAllPads

* npm-load-remove: migrateDirtyDBtoRealDB

* npm-load-remove: migrateDirtyDBtoRealDB path

* npm-load-remove: migrateDirtyDBtoRealDB dbclose fix

* npm-load-remove: migrateDirtyDBtoRealDB remove commented out line

* npm-load-remove: migrateDirtyDBtoRealDB reintroduce util
2021-02-04 20:53:30 +00:00
Richard Hansen 5a865dfc7e pluginfw: Delete unused return value 2021-02-04 08:41:00 +00:00
Richard Hansen a145b97682 pluginfw: Use `for` loops to improve readability 2021-02-04 08:41:00 +00:00
Richard Hansen fdaacc44c8 pluginfw: Replace `slide.asyncMap()` with `Promise.all()` 2021-02-04 08:41:00 +00:00
Richard Hansen 746cc8cc34 pluginfw: In-line `formatPluginsWithVersion()`
There's only one caller of the function, so move the logic to where it
is used.
2021-02-04 08:41:00 +00:00
Richard Hansen cd1d322af4 /admin/plugins/info: Move logic to `.js` file 2021-02-04 08:41:00 +00:00
Richard Hansen c5f0274116 lint: Move functions up to fix more lint errors 2021-02-04 08:41:00 +00:00
Richard Hansen 99ca57f3ab lint: src/static/js/pluginfw/shared.js 2021-02-04 08:41:00 +00:00
Richard Hansen 2c80c1f2da lint: src/static/js/pluginfw/read-installed.js 2021-02-04 08:41:00 +00:00
Richard Hansen 2b32bc1840 lint: src/static/js/pluginfw/plugins.js 2021-02-04 08:41:00 +00:00
Richard Hansen 9a86ebec2a pluginfw: Fix state reset logic 2021-02-04 08:41:00 +00:00
Richard Hansen 895764e047 pluginfw: Return from `findUnmet()` early if not given an object
For some reason strings are sometimes passed to `findUnmet()`, which
is obviously unexpected given the way the code is written. Rather than
figure out why strings are passed and how to safely avoid passing
strings, just return early. The net effect is the same, but returning
early avoids setting a property on a string, which is prohibited in
strict mode.
2021-02-04 08:41:00 +00:00
Richard Hansen a06662fd00 pluginfw: Delete commented-out code 2021-02-04 08:41:00 +00:00
Richard Hansen c64ee6ff4c pluginfw: Call `npm.load()` before using `npm`
This code is only used when testing `read-installed.js` by running it
directly (e.g., `node src/static/js/pluginfw/read-installed.js`).
2021-02-04 08:41:00 +00:00
translatewiki.net a5bde7982a Localisation updates from https://translatewiki.net. 2021-02-04 08:58:26 +01:00
John McLear 1076783985
tests: backend test coverage for #3227 where a group cannot be deleted if it has pads. 2021-02-03 10:39:30 +00:00
freddii ea202e41f6 docs: fixed typos 2021-02-03 00:30:07 +01:00
John McLear 65dec5bd2c lint: json.js 2021-02-02 15:24:12 -05:00
Richard Hansen 05e0e8dbf7 hooks: New `callAllSerial()` function
This is necessary to migrate away from `callAll()` (which only
supports synchronous hook functions).
2021-02-02 09:09:02 +00:00
Richard Hansen 763fe6fc26 hooks: Document `callFirst()` and `aCallFirst()` 2021-02-02 09:09:02 +00:00
Richard Hansen ba0544ea9e hooks: Add unit tests for `callFirst()`, `aCallFirst()` 2021-02-02 09:09:02 +00:00
Richard Hansen 6f30ea7c38 hooks: Use `callHookFn{Sync,Async}()` for `{call,aCall}First()`
Benefits of `callHookFnSync()` and `callHookFnAsync()`:
  * They are a lot more forgiving than `hookCallWrapper()` was.
  * They perform useful sanity checks.
  * They have extensive unit test coverage.
  * They make the behavior of `callFirst()` and `aCallFirst()` match
    the behavior of `callAll()` and `aCallAll()`.
2021-02-02 09:09:02 +00:00
Richard Hansen c11d60c5f6 hooks: Check context nullness, not truthiness 2021-02-02 09:09:02 +00:00
Richard Hansen fd5d3ce777 hooks: Inline `aCallFirst()` into `exports.aCallFirst()` 2021-02-02 09:09:02 +00:00
Richard Hansen 77f480d954 hooks: Asyncify `aCallFirst` 2021-02-02 09:09:02 +00:00
Richard Hansen 22d02dbcbf hooks: Factor out value normalization 2021-02-02 09:09:02 +00:00
Richard Hansen f316a3bacd hooks: Never pass a falsy error to a callback 2021-02-02 09:09:02 +00:00
Richard Hansen 708206449a hooks: Factor out callback attachment
The separate function will be reused in a future commit.
2021-02-02 09:09:02 +00:00
Richard Hansen 13e806ad7a hooks: Inline `mapFirst()` into `aCallFirst()` for readability
There's only one caller of the function, and the function is simple,
so there's no need for a separate function.
2021-02-02 09:09:02 +00:00
Richard Hansen 4ab7a99512 hooks: Inline `syncMapFirst()` into `callFirst()` for readability
There's only one caller of the function, and the function is simple,
so there's no need for a separate function.
2021-02-02 09:09:02 +00:00
Richard Hansen 53ccfa8703 hooks: Asyncify `mapFirst` 2021-02-02 09:09:02 +00:00
Richard Hansen 0b83ff8ec2 hooks: Simplify `syncMapFirst` iteration 2021-02-02 09:09:02 +00:00
Richard Hansen c89db33ff0 hooks: Refine caveat comments about function parameter count 2021-02-02 09:09:02 +00:00
Richard Hansen f02f288e80 hooks: Rename `args` to `context` for consistency 2021-02-02 09:09:02 +00:00
Richard Hansen 7dba847f21 hooks: Don't export `syncMapFirst` or `mapFirst`
Nobody uses these functions outside of this file.
2021-02-02 09:09:02 +00:00
Richard Hansen 6b42dabf6c hooks: Delete unused `bubbleExceptions` setting 2021-02-02 09:09:02 +00:00
Richard Hansen ba02e70020 tests: Make the fake webaccess hook registrations look more real
The additional properties will be needed once `aCallAll()` is upgraded
to use `callHookFnAsync()`.
2021-02-02 09:09:02 +00:00
Richard Hansen 47f0a7dacf lint: Fix more ESLint errors 2021-02-02 09:09:02 +00:00
Richard Hansen 1bc52f4913 hooks: Remove unnecessary `callAllStr()` function 2021-02-02 09:09:02 +00:00
John McLear 3e910b9905 stale: remove convert.js as no one runs old Etherpad 2021-02-01 22:45:51 +00:00
John McLear 915849b319
Low hanging lint frontend tests (#4695)
* lint: low hanging specs/alphabet.js

* lint: low hanging specs/authorship_of_editions.js

* lint: low hanging specs/bold.js

* lint: low hanging specs/caret.js

* lint: low hanging specs/change_user_color.js

* lint: low hanging specs/change_user_name.js

* lint: low hanging specs/chat.js

* lint: low hanging specs/chat_load_messages.js

* lint: low hanging specs/clear_authorship_colors.js

* lint: low hanging specs/delete.js

* lint: low hanging specs/drag_and_drop.js

* lint: low hanging specs/embed_value.js

* lint: low hanging specs/enter.js

* lint: low hanging specs/font_type.js

* lint: low hanging specs/helper.js

* lint: low hanging specs/importexport.js

* lint: low hanging specs/importindents.js

* lint: low hanging specs/indentation.js

* lint: low hanging specs/italic.js

* lint: low hanging specs/language.js

* lint: low hanging specs/multiple_authors_clear_authorship_colors.js

* lint: low hanging specs/ordered_list.js

* lint: low hanging specs/pad_modal.js

* lint: low hanging specs/redo.js

* lint: low hanging specs/responsiveness.js

* lint: low hanging specs/select_formatting_buttons.js

* lint: low hanging specs/strikethrough.js

* lint: low hanging specs/timeslider.js

* lint: low hanging specs/timeslider_labels.js

* lint: low hanging specs/timeslider_numeric_padID.js

* lint: low hanging specs/timeslider_revisions.js

* lint: low hanging specs/undo.js

* lint: low hanging specs/unordered_list.js

* lint: low hanging specs/xxauto_reconnect.js

* lint: attempt to do remote_runner.js

* lint: helper linting

* lint: rate limit linting

* use constructor for Event to make eslint happier

* for squash: lint fix refinements

* for squash: lint fix refinements

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-02-01 20:23:14 +00:00
Richard Hansen 759e2aaec3 lint: Use node config for tests/frontend/travis, tests/ratelimit
The files in these directories contain test drivers, not tests.
2021-02-01 19:52:24 +00:00
John McLear 9987fab574 lint: low hanging bin/doc/*.js 2021-02-01 13:15:48 -05:00
translatewiki.net 5b701b97c3 Localisation updates from https://translatewiki.net. 2021-02-01 15:21:50 +01:00
John McLear b3dda3b11c lint: src/static/js/pluginfw/*.js 2021-01-30 17:00:40 -05:00
John McLear 0cc8405e9c Bump minimum required Node.js version to 10.17.0
This makes it possible to use fs.promises.
2021-01-30 17:00:40 -05:00
Richard Hansen 877f0c5883 server: Use wtfnode to log reasons why node isn't exiting 2021-01-30 08:05:08 +00:00
Richard Hansen ba81ead101 server: Remove all other signal listeners 2021-01-30 08:05:08 +00:00
Richard Hansen ecdb105bfe server: Refine process lifetime management
Define states and use them to properly handle multiple calls to
`start()`, `stop()`, and `exit()`. (Multiple calls to `exit()` can
happen if there is an uncaught exception or signal during shutdown.)

This should also make it easier to add support for cleanly restarting
the server after a shutdown (for tests or via an `/admin` page).
2021-01-30 08:05:08 +00:00
Richard Hansen 725023fe58 server: Refactor `stop()` to avoid no-async-promise-executor lint error
Also log when Etherpad has stopped.
2021-01-30 08:05:08 +00:00
Richard Hansen d339f2a671 server: Perform init after adding uncaught exception handler
This avoids an unnecessary `try` block.
2021-01-30 08:05:08 +00:00
Richard Hansen 86ceb2b610 server: Exit on unhandled Promise rejection 2021-01-30 08:05:08 +00:00
Richard Hansen 0ad0160b7c bin/rebuildPad.js: Fix check for existing rev 2021-01-30 07:45:37 +00:00
Richard Hansen 846e3e9fbd bin/rebuildPad.js: Don't overwrite DB settings
There's no need, and setting `json` to true breaks databases that do
their own serialization of ECMAScript objects.
2021-01-30 07:45:37 +00:00
Richard Hansen bf209ddad3 bin/rebuildPad.js: Close the database when done
This prevents loss of data due to unflushed writes.
2021-01-30 07:45:37 +00:00
Richard Hansen 809dc6e367 bin/rebuildPad.js: PadManager must be loaded before Pad
There is a circular dependency between the two; loading PadManager
first ensures that PadManager's Pad variable is not undefined.
2021-01-30 07:45:37 +00:00
Richard Hansen 5b519b9a9c bin/rebuildPad.js: Asyncify 2021-01-30 07:45:37 +00:00
Richard Hansen 72c2abab8d bin/rebuildPad.js: Fix sequencing of asynchronous functions 2021-01-30 07:45:37 +00:00
Richard Hansen 69efd16a6d bin/rebuildPad.js: Add missing calls to `util.callbackify` 2021-01-30 07:45:37 +00:00
Richard Hansen c622894fe0 bin scripts: Promisify db.init and db.close 2021-01-30 07:45:37 +00:00
Richard Hansen 0a61767901 bin scripts: Delete redundant exception log messages
The exception will cause Node.js to print the error message and stack
trace so there's no point in logging it ourselves.
2021-01-30 07:45:37 +00:00
Richard Hansen efdcaae526 bin scripts: Promisify npm.load 2021-01-30 07:45:37 +00:00
Richard Hansen 92cd2cc760 bin scripts: Use destructuring instead of long condition checks 2021-01-30 07:45:37 +00:00
Richard Hansen f03c4bd7f7 bin scripts: compare against null, not undefined 2021-01-30 07:45:37 +00:00
John McLear 5bcd6f44a5
lint: skin-variants (#4603)
* lint: skin-variants

* for squash: Fix attachment of event listener

Before this PR the statement was outside the function. I'm assuming
the move into the function body was accidental, so move it back out.

* for squash: Preserve order of function calls

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-01-30 07:32:12 +00:00
John McLear 29179e512f lint: skiplist 2021-01-30 00:52:55 -05:00
John McLear f72ce463ef lint: undomodule 2021-01-30 00:51:29 -05:00
Richard Hansen 89bcfa2b4a tests: Stop using nyc
There are some problems with nyc:
  * The coverage numbers aren't useful in our case because most of the
    code is executed outside the test process (the test code is mostly
    API client logic).
  * nyc messes with line numbers, which makes it much harder to debug
    problems.
  * We're seeing frequent SIGABRT crashes while nyc is printing the
    results table. I'm not sure if nyc is the cause of the crashes, or
    if it's making a race condition worse, or if the crashes have
    nothing to do with nyc, but we don't lose much by removing it so
    we might as well see if the crash frequency improves.
2021-01-29 09:17:17 +00:00
John McLear 0897a28e70 lint: AttributeManager 2021-01-29 09:16:50 +00:00
Richard Hansen 873987f989 tests: Asyncify indentation test
This makes it much easier to see why a test is failing. Before, a
`helper.waitFor()` failure would simply cause the test to time out.
Now an exception is displayed.
2021-01-29 09:16:50 +00:00
Richard Hansen 462530eafb AttributeManager: Fix attribute name during attribute removal
Before this change, the `author` attribute was silently discarded
during `.map()` iteration and the name of the attribute to remove was
included twice with two different values.
2021-01-29 09:16:50 +00:00
Richard Hansen 8efc87f33a AttributeManager: Fix bogus `this` during attribute removal
Before this commit, the callback passed to `.map()` during attribute
removal was a normal function, not an arrow function. This meant that
the value of `this` in the function body depended on how the callback
was invoked. In this case, the callback was invoked without any
explicit context (it was not called as a method, nor was it called via
`.call()`, `.apply()`, or `.bind()`). Without any explicit context,
the value of `this` depends on strict mode. Currently the function is
in sloppy mode, so `this` refers to the "global this" object (a.k.a.,
`window`). It doesn't make sense for the callback to reference
`window.author`, so I'm assuming the previous behavior was a bug.

Now the function is an arrow function, so the value of `this` comes
from the enclosing lexical context, which in this case is the
AttributeManager object. I believe that was the original intention.
2021-01-29 09:16:50 +00:00
Richard Hansen c1ef12b8da lint: Re-run eslint --fix 2021-01-29 01:14:03 -05:00
Richard Hansen b02ab430fe Bump eslint-config-etherpad to 1.0.24 2021-01-29 01:10:58 -05:00
John McLear 5d7645e36a lint: ace2_common.js linting 2021-01-29 00:53:59 -05:00
John McLear f6eb6bd266 remove dead object code 2021-01-29 00:53:22 -05:00
translatewiki.net 989f42204f Localisation updates from https://translatewiki.net. 2021-01-28 18:48:11 +01:00
Richard Hansen 7f392e12e9 tests: Create a `src/tests/` symlink that points to `tests/`
This makes it possible for plugin backend tests to do
`require('ep_etherpad-lite/tests/backend/common')` to access the API
key (among other things).

Eventually we probably should reverse these (move `tests/` to
`src/tests/` and make `tests/` a symlink to `src/tests/`) and move
`bin/` to `src/bin/` so that we can avoid the top-level `package.json`
mess.
2021-01-28 10:02:58 +00:00
Richard Hansen 53092fa7af db/Pad: Call padCopy and padRemove hooks asynchronously 2021-01-28 09:36:22 +00:00
Richard Hansen e5b45cc984 contentcollector: Delete unnecessary `dom` functions
And move the remaining functions out of the `makeContentCollector()`
function.
2021-01-27 04:59:36 +00:00
Richard Hansen 275f041fbb contentcollector: Simplify child node access 2021-01-27 04:59:36 +00:00
Richard Hansen 1cb5453aeb contentcollector: Skip over non-Text, non-Element Nodes 2021-01-27 04:59:36 +00:00
Richard Hansen 075969aea0 contentcollector: Fix Element tag name fetch
The `name` property is only available on cheerio's Element-like
objects; DOM Element objects do not have a `name` property. Switch to
`dom.tagName()` to fix the logic for browsers.
2021-01-27 04:59:36 +00:00
Richard Hansen e3ec9d9a4c contentcollector: Fix parent node access
The `parent` property is only available on cheerio's Node-like
objects; DOM Node objects do not have a `parent` property. Switch to
the `parentNode` property so that the code works in browsers as well
as cheerio.
2021-01-27 04:59:36 +00:00
Richard Hansen 1d36549152 contentcollector: Delete unnecessary parentheses 2021-01-27 04:59:36 +00:00
Richard Hansen e3a47e48f9 contentcollector: Fix collectContentLineText hook
Before, the hook always ignored the return values provided by the hook
functions. Now the hook functions can change the text by either
returning a string or setting `context.text` to the desired value.

Also drop the `styl` and `cls` context properties. They were never
documented and they were always null.
2021-01-27 04:59:36 +00:00
Richard Hansen 4e220538a1 contentcollector: Use destructuring to improve readability 2021-01-27 04:59:36 +00:00
Richard Hansen b547ce9a47 contentcollector: Invert logic to improve readability 2021-01-27 04:59:36 +00:00
Richard Hansen b811030846 contentcollector: Delete unnecessary truthiness check 2021-01-27 04:59:36 +00:00
Richard Hansen fc2420c244 contentcollector: Fix iteration over child Nodes
In the DOM, `.children` only includes children that are Element
objects. In cheerio 0.22.0, `.children` includes all child Nodes, not
just Elements. Use `dom.numChildNodes()` and `dom.childNode()` so that
browsers behave the same as cheerio.
2021-01-27 04:59:36 +00:00
Richard Hansen d0bfb54c0a contentcollector: Avoid `for..in` iteration of object properties
`for..in` iterates over inherited properties, which is almost never
desired. In most cases there aren't any inherited enumerable
properties so it's not that big of a deal, but in the case of
HTMLCollection it's very bad because it iterates over every entry
twice (once by numerical index and once by name) plus it includes the
`length` property in the iteration.
2021-01-27 04:59:36 +00:00
Richard Hansen 3cfec58948 contentcollector: Rename `dom` functions for consistency with DOM spec 2021-01-27 04:59:36 +00:00
Richard Hansen 8763c3bb29 contentcollector: Fix Element attribute accesses
The `attribs` property is only available on cheerio's Element-like
objects; DOM Element objects do not have an `attribs` property. Switch
to `dom.nodeAttr()` to fix the logic for browsers.
2021-01-27 04:59:36 +00:00
Richard Hansen 99625950c8 contentcollector: Factor out call to `.toLowerCase()` 2021-01-27 04:59:36 +00:00
Richard Hansen dd7fb1babe contentcollector: Document the `dom` object 2021-01-27 04:59:36 +00:00
Richard Hansen 74bb2f76cc contentcollector: Delete unused `domInterface` parameter 2021-01-27 04:59:36 +00:00
Richard Hansen 42c25b2536 openapi: Fix error logging 2021-01-27 04:59:36 +00:00
Richard Hansen 56f617060a tests: Fix missing call to `done` callback 2021-01-27 04:59:36 +00:00
Richard Hansen b164f9b431 tests: Replace "expected" with "want", "received" with "got"
"Got" and "want" are common terms for testing, plus this fixes a
spelling mistake ("received" was misspelled as "recieved").
2021-01-27 04:59:36 +00:00
Richard Hansen fc69ae78aa tests: Use `assert.deepEqual()` to simplify equality checks 2021-01-27 04:59:36 +00:00
Richard Hansen dd815892f2 tests: Delete erroneous `describe()` calls
`describe()` is meant to be used by independent tests, but the tests
in this file are not independent. Add a higher-level `describe()` call
and delete all of the `describe()` calls that wrap a single test.
2021-01-27 04:59:36 +00:00
Richard Hansen 32a0df4883 tests: Fix invalid HTML in contentcollector tests
The HTML spec does not permit `<pre>` as a child of `<p>`.
2021-01-27 04:59:36 +00:00
Richard Hansen 53160f4a21 tests: Delete invalid contentcollector test
The HTML spec doesn't allow `<ul>` to be a child of `<ol>` (it must be
a child of `<li>` instead).
2021-01-27 04:59:36 +00:00
Richard Hansen 906b2624ed tests: Re-enable import/export test that is now working 2021-01-27 04:59:36 +00:00
Richard Hansen 54a3dbb9a0 lint: Fix some straightforward ESLint errors 2021-01-27 04:59:36 +00:00
Bartlomiej Witczak 4b4b685bba
fix: runtime error if no buttons are present in toolbar (#4680)
Co-authored-by: Bartek Witczak <bartek@dayone.pl>
2021-01-26 11:02:54 +00:00
Richard Hansen b73b0bcb98 farbtastic: Minimize diff to upstream
This should make it easier to upgrade to the latest version.
2021-01-26 04:07:43 -05:00
Richard Hansen a0745d74b9 farbtastic: Document where the code came from 2021-01-26 04:07:43 -05:00
John McLear 3a19254f21 stale code: removed excanvas which was ie support for no canvas 2021-01-26 04:05:54 -05:00
John McLear 7768871f8f security: bumping socketio version due to vulnerability 2021-01-26 00:53:04 -05:00
John McLear 81b860bc35 tests: allow for longer timeout 2021-01-25 22:53:11 -05:00
John McLear 44c2bc040c lint: tests/backend/specs/api/tidy.js 2021-01-25 22:53:11 -05:00
Richard Hansen 610326b496 lint: tests/backend/specs/api/importexportGetPost.js 2021-01-25 22:53:11 -05:00
John McLear 7421730b44 lint: src/node/utils/toolbar.js 2021-01-25 22:53:11 -05:00
John McLear 89aa8cf55e lint: src/node/utils/randomstring.js 2021-01-25 22:53:11 -05:00
John McLear 21ef857d8a lint: src/node/utils/promises.js 2021-01-25 22:53:11 -05:00
John McLear b831feae66 lint: src/node/utils/path_exists.js 2021-01-25 22:53:11 -05:00
John McLear 4f7e322d53 lint: src/node/utils/padDiff.js 2021-01-25 22:53:11 -05:00
John McLear 9759e09387 lint: src/node/utils/customError.js 2021-01-25 22:53:11 -05:00
John McLear f664f84da5 lint: src/node/utils/caching_middleware.js 2021-01-25 22:53:11 -05:00
John McLear 02c1bf7d81 lint: src/node/utils/UpdateCheck.js 2021-01-25 22:53:11 -05:00
John McLear f8323eae89 lint: src/node/utils/TidyHtml.js 2021-01-25 22:53:11 -05:00
John McLear 31f1e39565 lint: src/node/utils/Settings.js 2021-01-25 22:53:11 -05:00
John McLear af8ea6b45f lint: src/node/utils/NodeVersion.js 2021-01-25 22:53:11 -05:00
John McLear b11ba23208 lint: src/node/utils/MinifyWorker.js 2021-01-25 22:53:11 -05:00
John McLear b5e04d867e lint: src/node/utils/LibreOffice.js 2021-01-25 22:53:11 -05:00
John McLear 85d1dc8d71 lint: src/node/utils/ImportHtml.js 2021-01-25 22:53:11 -05:00
John McLear a41b4b8e45 lint: src/node/utils/ImportEtherpad.js 2021-01-25 22:53:11 -05:00
John McLear 9fff82e370 lint: src/node/utils/ExportTxt.js 2021-01-25 22:53:11 -05:00
John McLear bfabe7c297 lint: src/node/utils/ExportHtml.js 2021-01-25 22:53:11 -05:00
John McLear c44c4edc10 lint: src/node/utils/ExportHelper.js 2021-01-25 22:53:11 -05:00
John McLear a4764faded lint: src/node/utils/ExportEtherpad.js 2021-01-25 22:53:11 -05:00
John McLear 52f60ceeaa lint: src/node/utils/Cli.js 2021-01-25 22:53:11 -05:00
John McLear 60bc849be2 lint: src/node/utils/AbsolutePaths.js 2021-01-25 22:53:11 -05:00
John McLear 7afc809073 lint: src/node/utils/Abiword.js 2021-01-25 22:53:11 -05:00
John McLear 666dd7abd1 lint: src/node/padaccess.js 2021-01-25 22:53:11 -05:00
John McLear 6054f6d93f lint: src/node/hooks/i18n.js 2021-01-25 22:53:11 -05:00
John McLear 2dec36bfd7 lint: src/node/hooks/express/tests.js 2021-01-25 22:53:11 -05:00
John McLear 6df3eadecd lint: src/node/hooks/express/static.js 2021-01-25 22:53:11 -05:00
John McLear 09fc7438ea lint: src/node/hooks/express/specialpages.js 2021-01-25 22:53:11 -05:00
John McLear 72ddf35426 lint: src/node/hooks/express/padurlsanitize.js 2021-01-25 22:53:10 -05:00
John McLear 43ce0f839b lint: src/node/hooks/express/padreadonly.js 2021-01-25 22:53:10 -05:00
John McLear 2f9a3ec655 lint: src/node/hooks/express/openapi.js 2021-01-25 22:53:10 -05:00
John McLear 18ebf7b69a lint: src/node/hooks/express/isValidJSONPName.js 2021-01-25 22:53:10 -05:00
John McLear 3571eb7c32 lint: src/node/hooks/express/importexport.js 2021-01-25 22:53:10 -05:00
John McLear 3cf6e1f015 lint: src/node/hooks/express/errorhandling.js 2021-01-25 22:53:10 -05:00
John McLear 4de2844af2 lint: src/node/hooks/express/apicalls.js 2021-01-25 22:53:10 -05:00
John McLear fbc70c1276 lint: src/node/hooks/express/adminplugins.js 2021-01-25 22:53:10 -05:00
John McLear 3a586a7aad lint: src/node/hooks/express/admin.js 2021-01-25 22:53:10 -05:00
John McLear acf889b7de lint: src/node/handler/SocketIORouter.js 2021-01-25 22:53:10 -05:00
John McLear 532bde71f7 lint: src/node/handler/PadMessageHandler.js 2021-01-25 22:53:10 -05:00
John McLear 841d45cbe1 lint: src/node/handler/ImportHandler.js 2021-01-25 22:53:10 -05:00
John McLear 2fe5d1f873 lint: src/node/handler/ExportHandler.js 2021-01-25 22:53:10 -05:00
John McLear a7d9a703cd lint: src/node/handler/APIHandler.js 2021-01-25 22:53:10 -05:00
John McLear ee9bb019b2 lint: src/node/easysync_tests.js 2021-01-25 22:53:10 -05:00
John McLear 8fb6912fc9 lint: src/node/db/SessionStore.js 2021-01-25 22:53:09 -05:00
John McLear 3681f72afd lint: src/node/db/SessionManager.js 2021-01-25 17:56:28 -05:00
John McLear 93bc21b5f3 lint: src/node/db/SecurityManager.js 2021-01-25 17:56:28 -05:00
John McLear 5ce255c789 lint: src/node/db/ReadOnlyManager.js 2021-01-25 17:56:28 -05:00
John McLear e06b9442e0 lint: src/node/db/PadManager.js 2021-01-25 17:56:28 -05:00
John McLear f0c26c9ba2 lint: src/node/db/Pad.js 2021-01-25 17:56:27 -05:00
John McLear 5ecb3f9f37 lint: src/node/db/GroupManager.js 2021-01-25 17:56:27 -05:00
John McLear 8aa729a36f lint: src/node/db/AuthorManager.js 2021-01-25 17:56:27 -05:00
John McLear d9225f326f lint: src/node/db/API.js 2021-01-25 17:56:27 -05:00
translatewiki.net f0cafe88f2 Localisation updates from https://translatewiki.net. 2021-01-25 18:04:09 +01:00
Richard Hansen f7b1133600 GitHub workflows: Install Etherpad deps after installing plugins 2021-01-23 18:14:01 -05:00
Richard Hansen e32a623468 GitHub workflows: Synchronize plugin lists 2021-01-23 18:12:57 -05:00
Richard Hansen 57be60d1d4 GitHub workflows: Break list of plugins across multiple lines
This makes it easier to review changes to the list.
2021-01-23 18:12:49 -05:00
Richard Hansen 41a501778d Update top-level `package-lock.json`
Whenever `src/package-lock.json` is updated, the top-level
`package-lock.json` must also be updated.
2021-01-23 17:26:41 -05:00
John McLear ee158b0fe5
bugfix: bump ueberdb to 1.2.5 to resolve #4645 which caused a users color not to be persistent 2021-01-23 13:54:50 +00:00
John McLear f0a77cb98c
lint: contentcollector and domline
Various tidy up and linting of contentcollector.js and domline.js.

3 Tests disabled which are not due to be covered.

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-01-22 20:41:14 +00:00
Richard Hansen 10a91825fc ace2_inner: Fix argument bug in `execCommand()`
This fixes a bug introduced in commit
c38c34bef4.
2021-01-22 17:02:38 +00:00
Richard Hansen aeedaac04e ace2_inner: Improve readability of object creation 2021-01-22 17:02:38 +00:00
Richard Hansen 2f430e3a5a ace2_inner: Fix some ESLint errors 2021-01-22 17:02:38 +00:00
Richard Hansen 0bfabfef5d ace2_inner: Avoid unnecessary use of underscore.js
This silences a bunch of you-dont-need-underscore-lodash ESLint
warnings.
2021-01-22 17:02:38 +00:00
Richard Hansen 51dc5b1627 ace2_inner: Delete dead code 2021-01-22 17:02:38 +00:00
Richard Hansen bfe813fca2 docs: Wrap long lines and fix whitespace 2021-01-22 02:25:48 -05:00
translatewiki.net e5836150cd Localisation updates from https://translatewiki.net. 2021-01-21 15:09:02 +01:00
Richard Hansen 517fc88c54 eejs: Cache the compiled template, not the template string 2021-01-20 08:15:43 +00:00
Richard Hansen 4d2d439874 eejs: Simplify cache lookup logic 2021-01-20 08:15:43 +00:00
Richard Hansen c8c3929058 eejs: Inline `begin_capture`, `end_capture` 2021-01-20 08:15:43 +00:00
Richard Hansen 7d11d54323 eejs: Delete unused functions 2021-01-20 08:15:43 +00:00
Richard Hansen 351913c08e eejs: Delete broken example 2021-01-20 08:15:43 +00:00
Richard Hansen 5987f75b0d eejs: Unwrap unnecessarily wrapped line 2021-01-20 08:15:43 +00:00
bytecaster 1d6319b852 docs: Remove ep_page_view from README
Removes ep_page_view plugin from the installation instructions in README.md to aid new users installing etherpad-lite.

According to the plugin directory at https://static.etherpad.org/index.html, the plugin is defunct as it is now part of etherpad-lite core and when I tried installing etherpad with the plugin (following the instructions), its installation resulted in an error every time I opened a pad.
2021-01-20 07:38:54 +00:00
Richard Hansen ebc4956277 eejs: Fix straightforward ESLint errors 2021-01-19 19:59:25 +00:00
translatewiki.net c89da1a9f2 Localisation updates from https://translatewiki.net. 2021-01-18 16:46:17 +01:00
John McLear 2fdc737355
bugfix, lint and refactor all bin scripts (#4617)
* bugfix, lint and refactor all bin scripts

* for squash: throw Error(message) rather than log(message); throw Error()

* for squash: Exit non-0 on unhandled Promise rejection

Many of the recent lint changes have converted normal functions to
async functions, and an error thrown in an async function does not
cause Node.js to exit by default.

* for squash: fix `require()` paths

* for squash: remove erroneous `Object.keys()` call

* for squash: fix missing `continue` statements

* for squash: Fix HTTP method for deleteSession

* for squash: delete erroneous throw

Throw is only for errors, not successful completion.

* for squash: redo migrateDirtyDBtoRealDB.js to fix async bugs

* for squash: fix erroneous use of `for..of`

* for squash: Add line break between statements

* for squash: put closing paren on same line as last arg

* for squash: Move `log()` back up where it was

to minimize the diff to develop

* for squash: indentation fixes

* for squash: typo fix

* for squash: wrap long lines

* for squash: use `util.callbackify` to silence promise/no-callback-in-promise warning

* for squash: use double quotes to improve readability

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-01-18 08:53:15 +00:00
John McLear c0d9881a62
stats: add memoryUsageHeap value 2021-01-16 19:36:00 +00:00
Richard Hansen dda968e17d Sync top-level `package-lock.json` 2021-01-15 18:06:27 -05:00
Richard Hansen 4bda5272df Revert "db: Capitalize `Database` constructor"
I thought a PR adding capitalized `Database` landed in ueberdb2, but
apparently not.

This reverts commit 611d416d54.
2021-01-15 18:05:39 -05:00
Richard Hansen 0ba833c632 db: Update ueberdb2 dependency 2021-01-15 22:37:18 +00:00
Richard Hansen 611d416d54 db: Capitalize `Database` constructor 2021-01-15 22:37:18 +00:00
translatewiki.net 52c08794de Localisation updates from https://translatewiki.net. 2021-01-14 15:44:58 +01:00
John McLear 2929ba9894 lint: cssmanager.js 2021-01-14 13:06:34 +00:00
John McLear d9f3bb0e39 lint: colorutils.js 2021-01-14 13:06:34 +00:00
John McLear 1d57d4ee3f lint: caretPosition linting 2021-01-14 13:06:34 +00:00
John McLear aeab9cc0ad lint: attributepool fix incorrect commit 2021-01-14 13:06:34 +00:00
John McLear 76744d9783 lint: AttributePool.js 2021-01-14 13:06:34 +00:00
John McLear efc323cd71 Revert "lint: attributepool.js"
This reverts commit 33baaafbdeb4c0f82ec504738f5851f9ab5261a8.
2021-01-14 13:06:34 +00:00
John McLear 75ffe40c09 lint: attributepool.js 2021-01-14 13:06:34 +00:00
John McLear 46dc943101 lint: linestylefilter and rjquery.js 2021-01-14 13:06:34 +00:00
John McLear c38c34bef4
linting: ace2_inner
* remove IE and add strict headers

* linting: kids are back, need to stop for today

* linting: farbtastic fix

* lint: more lint fixes

* more lint fixes

* linting: sub 100 errors

* comments where I need help

* ready to be helped :)

* small fixes

* fixes

* linting: all errors resolved

* linting: remove note to self

* fix as per nulli/wezz000li suggestion

* fix as per nulli/wezz000li suggestion

* resolve merge conflicts

* better use if to silence eslint

* Use `for..of` with `Object.keys` instead of `for..in`

* lint: move setSelection to before call

Co-authored-by: webzwo0i <webzwo0i@c3d2.de>
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-01-14 10:00:14 +00:00
Richard Hansen edbe6d5387 Bump ueberDB to get speed improvements 2021-01-11 09:23:08 +00:00
Richard Hansen 481fa047e4 checkPlugin: Merge the `autoupdate` option into `autofix` 2021-01-11 08:51:04 +00:00
Richard Hansen 039c50de80 checkPlugin: Make `autocommit` imply `autoupdate`, `autoupdate` imply `autofix` 2021-01-11 08:51:04 +00:00
Richard Hansen 27df9df47f checkPlugin: Revise README.md 2021-01-11 08:51:04 +00:00
Richard Hansen adb38d0d61 checkPlugin: Display a diff of the changes 2021-01-11 08:51:04 +00:00
Richard Hansen 6ccbe374d8 checkPlugin: Don't nuke `node_modules/`
`git add -A` will ignore `node_modules/` because it's in `.gitignore`.
2021-01-11 08:51:04 +00:00
Richard Hansen 5f2aaea255 checkPlugin: Use git to determine whether there were changes 2021-01-11 08:51:04 +00:00
Richard Hansen 9f4bcfb79b checkPlugin: Ensure that a peer dep for `ep_etherpad-lite` exists
Tweak the new `updateDeps()` function and use it to add the
`ep_etherpad-lite` dependency if it is missing.
2021-01-11 08:51:04 +00:00
Richard Hansen 42da976705 checkPlugin: Move dependency update logic to a generic function
This will make it possible to reuse the logic for `peerDependencies`.
2021-01-11 08:51:04 +00:00
Richard Hansen 747f323552 checkPlugin: Use absolute path when installing `ep_etherpad-lite`
This makes it possible to check plugins that were installed by
symlinking into `node_modules/` like this:

    git clone git@github.com:ether/etherpad-lite.git
    git clone git@github.com:ether/ep_example.git
    cd etherpad-lite
    npm i ep_example@file:../ep_example
    node ./bin/checkPlugin.js ep_example
2021-01-11 08:51:04 +00:00
Richard Hansen b719affe6e checkPlugin: Unconditionally run `npm install` 2021-01-11 08:51:04 +00:00
Richard Hansen bba47ea2df checkPlugin: Make sure `package.json` ends with a newline 2021-01-11 08:51:04 +00:00
Richard Hansen bf8d55ab8e checkPlugin: New `writePackageJson()` convenience function 2021-01-11 08:51:04 +00:00
Richard Hansen b3b9afa668 checkPlugin: Split dirty working directory check into two checks
Rather than check for modifications and untracked files in one
command, use two commands: one for modifications and one for untracked
files. This makes the error messages easier to understand, and it
allows us to include `git status`-like output in the modifications
error message.
2021-01-09 22:49:27 +00:00
Richard Hansen 6a13baf7d4 checkPlugin: Use `--name-status` for `git diff-index`
`--compact-sumary` is relatively new (v2.17.0), and I actually
intended to use `--name-status` anyway.
2021-01-09 22:49:27 +00:00
Richard Hansen 071cca1d48 checkPlugin: Don't create an empty commit 2021-01-09 08:05:31 +00:00
Richard Hansen 38ca0c52a6 checkPlugin: Add lots of Git sanity checks 2021-01-09 08:05:31 +00:00
Richard Hansen 1a9bfc8d4f checkPlugin: Don't capture stdout when unnecessary 2021-01-09 08:05:31 +00:00
Richard Hansen 102c01f723 checkPlugin: Move log messages where they make more sense 2021-01-09 08:05:31 +00:00
Richard Hansen d816bb2b38 checkPlugin: New `execSync()` convenience function 2021-01-09 08:05:31 +00:00
Richard Hansen a55dd73f2b Typo fix: `checkPlugins.js` -> `checkPlugin.js` 2021-01-08 19:02:55 -05:00
Richard Hansen 44118c0e7b checkPlugin: Refine installation of lint dependencies 2021-01-08 19:02:55 -05:00
Richard Hansen a0d21f75c4 checkPlugin: Add missing lint dependency 2021-01-08 18:42:10 -05:00
Richard Hansen 6890bfada1 checkPlugin: Bump eslint, eslint-config-etherpad versions 2021-01-08 18:24:42 -05:00
Richard Hansen ba1c468865 checkPlugin: Fix command-line argument parsing bug 2021-01-08 18:07:55 -05:00
John McLear fd3004faad
checkPlugins: various minor updates (#4635)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-01-07 21:52:45 -05:00
John McLear 04962bfe39
update ueberdb to 1.1.7 (#4633) 2021-01-07 04:16:13 -05:00
Richard Hansen 3373f059e6 Plugin publish workflow: Run `git push` before `npm publish` 2021-01-05 21:59:03 +00:00
John McLear 6012a9a480 scripts: include v in release number to fix rleease script docs 2021-01-05 16:45:14 +00:00
translatewiki.net 68ca3fcdbd Localisation updates from https://translatewiki.net. 2021-01-04 14:43:02 +01:00
translatewiki.net 6d626c90d3 Localisation updates from https://translatewiki.net. 2020-12-29 08:50:16 +01:00
webzwo0i ca405c1685 send the test files with the correct content-type header 2020-12-27 23:40:35 +00:00
webzwo0i 951c93fa6d change_user_name test: refactor 2020-12-27 23:40:35 +00:00
John McLear 38c9827161
Feature: Scroll to Line number based on Hash IE http://foo.com/p/bar#L10 will scroll to line 10. (#4554)
Includes test coverage
Co-authored-by: webzwo0i <webzwo0i@c3d2.de>
2020-12-26 22:05:08 +01:00
John McLear e051f2f2f7 lint: scroll.js 2020-12-26 20:43:10 +00:00
webzwo0i b760e699c6 remove explicitly setting process.env.DEBUG 2020-12-24 08:46:25 +00:00
Richard Hansen 88f0310071 Merge branch 'master' into develop 2020-12-23 17:04:46 -05:00
Richard Hansen 01a763e15e Merge branch 'develop' into master 2020-12-23 17:03:33 -05:00
Richard Hansen 9a15af78b6 Regenerate `src/package-lock.json` with npm v6.14.9
This reverts the file back to lockfileVersion 1, which is used by the
LTS version of npm.
2020-12-23 16:58:30 -05:00
Richard Hansen f773193f3c Merge branch 'master' into develop 2020-12-23 16:44:16 -05:00
John McLear 4671b275e9 script: various fixes to release script 2020-12-23 16:27:02 -05:00
Richard Hansen 020f5ff730 Merge branch 'develop' into master 2020-12-23 16:21:00 -05:00
John McLear d9262fccbd bump version 2020-12-23 16:18:28 -05:00
John McLear b59461a469 script: include package files in release script logic 2020-12-23 16:18:28 -05:00
John McLear 89ae726221 script: close console log in release script... 2020-12-23 16:18:28 -05:00
John McLear ece7fd896c scripts: A script to create an Etherpad release (#4538) 2020-12-23 16:18:28 -05:00
John McLear 998c80607e changelog: updated changelog 2020-12-23 16:18:28 -05:00
John McLear 1a845773ee css: loading position box 2020-12-23 16:18:28 -05:00
Richard Hansen f31232dd20 socket.io: Disconnect clients when closing HTTP server 2020-12-23 16:18:28 -05:00
Richard Hansen 9f7d42185d socket.io: Reconnect if the server disconnects
This will make the pages gracefully handle HTTP server restart events,
which happen whenever a plugin is installed or uninstalled via the
`/admin/plugins` page.
2020-12-23 16:18:28 -05:00
Richard Hansen 303964c51e socket.io: Factor out client connection logic 2020-12-23 16:18:28 -05:00
Richard Hansen 7eb0f996c3 socket.io: Delete ignored `resource` option
I couldn't find any reference to a `resource` option in either the
socket.io-client documentation or its source code.
2020-12-23 16:18:28 -05:00
Richard Hansen 7949219179 Reformat `src/ep.json` 2020-12-23 16:18:28 -05:00
Richard Hansen 8c1afc3399 express: New expressCloseServer hook
This will be used by a future commit to close all socket.io
connections during server restart.
2020-12-23 16:18:28 -05:00
Richard Hansen 3e8c3e5789 express: Factor out common server shutdown logic
Also log when the HTTP server is about to be closed and when it is
done closing.
2020-12-23 16:18:28 -05:00
Richard Hansen ff19181cd1 lint: Fix some straightforward ESLint errors 2020-12-23 16:18:28 -05:00
translatewiki.net ac086c7925 Localisation updates from https://translatewiki.net. 2020-12-23 16:18:28 -05:00
webzwo0i 790ba72a9e change scroll-behavior to auto
timeslider follow test: ensure there are so much lines in the pad view
below the changed line, so that the changed line will be the first
visible line
2020-12-23 16:18:28 -05:00
John McLear 996a2d86dd lint: chat (#4573)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2020-12-23 16:18:28 -05:00
John McLear 8bf463fb00 lint: broadcast_revisions (#4571)
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2020-12-23 16:17:59 -05:00
John McLear 4aef15cb11
lint: collab-client (#4574)
* lint: collab-client

* Undo incorrect lint fixes

These will be re-fixed in a future commit.

* Properly fix guard-for-in error

* Properly fix prefer-rest-params errors

* Move some code back to where it was

Moving the code makes it hard to review the diff.

* Delete DISCONNECT_REASON case

Someone reading the code won't understand what "used to handle
appLevelDisconnectReason" means until they dig through the Git
history. Given the server never sends messages of type
DISCONNECT_REASON anyway, just delete the case.

* Refine lint fixes

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2020-12-21 20:19:00 +00:00
Richard Hansen d34a70c940 Delete merge conflict marker
This fixes a bug introduced in commit
040057239e.
2020-12-20 18:32:30 -05:00
Hossein Marzban 170a230c3a
Lint: timeslider (#4580)
Squashed changes from rhansen@rhansen.org:
  * Move code back to where it was. (It's easier to review changes
    when the code isn't moved. This causes some no-use-before-define
    warnings to reappear, but those are just warnings.)
  * Move eslint-disable comment to same line
  * Use `window.clientvars` to resolve no-global-assign
  * Undo changes that aren't about fixing lint errors
2020-12-20 18:24:17 -05:00
John McLear bca60c8b17 lazydeveloper: remove console log 2020-12-20 10:56:19 +00:00
John McLear e18b9d1844 timeslider/bugfix: timeslider wasn't updating when new pad contents was created - #4595 2020-12-20 10:45:16 +00:00
John McLear 0362d3b05d
lint: pad prefix files (#4577)
* lint: pad_connectionstatus

* lint: pad_utils

* lint: pad_userlist.js -- still WIP

* shift underscore not to be in require but to be used from window

* lint: pad_modals

* pad_impexp.js

* lint: more errors done

* lint: auto reconn

* lint: pad_editor

* lint: finish auto reconn

* lint: imp exp rework

* lint: import

* lint: pad.js nearly done but pizza here...

* lint: clientVars global query

* put clientVars in window

* Revert incorrect lint fixes

* Properly fix guard-for-in lint errors

* Properly fix no-unused-vars error regarding `gritter`

* Refine lint fixes

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2020-12-20 07:15:58 +00:00
Hossein Marzban 34ee77993f
Lint: pluginfw tsort.js (#4576)
* lint: pluginfw tsort.js

* Don't comment out the `console.log()` call

Disabling the log message is out of scope for the pull request.

* Put const and let on separate lines

* Convert `tsort` from function to arrow function

ESLint doesn't complain about this due to a bug in
prefer-arrow/prefer-arrow-functions rule:
https://github.com/TristonJ/eslint-plugin-prefer-arrow/issues/24

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2020-12-20 06:18:49 +00:00
webzwo0i 040057239e
tests for spaces (#4594) 2020-12-20 06:18:19 +00:00
webzwo0i a637920e55
add list-style:none for ul.indents in exported HTML (#4586)
* add list-style:none for ul.indents in exported HTML

* use list-style-type not list-style
2020-12-20 06:00:18 +00:00
Richard Hansen b82bf5c726 Drop support for Internet Explorer 2020-12-19 19:13:31 +00:00
webzwo0i c5cf7ab144
tests: Ignore head tag on import / improved contentcollector tests
* fix accidental write to global variable
properly show pending tests
log test name in suite
better log output for received/expected strings

* cc tests: enable second nestedOL test

* ignore the head tag on import
2020-12-18 09:37:37 +00:00
webzwo0i 5673a76b38 cc tests: enable second nestedOL test 2020-12-18 09:30:18 +00:00
webzwo0i c989a8e279 fix accidental write to global variable
properly show pending tests
log test name in suite
better log output for received/expected strings
2020-12-18 09:30:18 +00:00
Richard Hansen d9b7aa489d pad import/export: Delete dead functions 2020-12-18 09:29:28 +00:00
Richard Hansen 7e50fc2ab5 Delete dead SERVER_MESSAGE and guest handling code
None of this code seems to be reachable. Hopefully no plugins expect
it to exist.
2020-12-18 09:29:28 +00:00
Richard Hansen 794dfb1863 lint: Bump eslint-config-etherpad and install its new deps 2020-12-17 22:18:29 +00:00
translatewiki.net c9db9500e5 Localisation updates from https://translatewiki.net. 2020-12-17 15:13:17 +01:00
Richard Hansen f54dcbc766 lint: Re-run `eslint --fix` 2020-12-16 22:09:48 +00:00
Richard Hansen fc234d0088 lint: Bump `eslint` and `eslint-config-etherpad` versions 2020-12-16 22:09:48 +00:00
John McLear 8bee2e41f4
docs: update Node version to 14 which is LTS 2020-12-16 19:50:21 +00:00
Richard Hansen af7cd13787 pad: Add a hook for the permission denied block
This makes it possible for the ep_readonly_guest plugin to add a login
button.
2020-12-16 19:39:52 +00:00
Richard Hansen 92b295193f css: Apply font formatting to the text, not the high-level div
This makes it possible for plugins to add new items without them
rendering centered, at a ridiculous size, or at an awkward location.
2020-12-16 19:39:52 +00:00
Richard Hansen 27dab35827 css: Delete absolute `line-height`
Having an absolute `line-height` causes problems when something sets
`font-size` without also setting `line-height`.
2020-12-16 19:39:52 +00:00
John McLear 92e36b82b5
linting: pad_editbar.js 2020-12-16 12:12:25 +00:00
Hossein Marzban 6f309ac20a
lint: pluginfw/client_plugins (#4572) 2020-12-15 21:40:41 -05:00
Richard Hansen a4e2ea7a8c Add missing dependency on mime-types
mime-types is used by `src/node/utils/Minify.js` since commit
2c944eba34.
2020-12-14 20:31:35 +00:00
Richard Hansen edf647044c Update `package-lock.json` and `src/package-lock.json` 2020-12-14 20:31:35 +00:00
translatewiki.net ef8a581acd Localisation updates from https://translatewiki.net. 2020-12-14 15:05:13 +01:00
Michael Murtaugh 66e3f02ed2
editor/bugfix: missing await in createClearStartAtext (#4561)
Missing await in call to this._pad.getInternalRevisionAText(rev). Function returns a promise. This bug breaks the createDiffHTML API call (how I discovered it).
2020-12-14 07:04:14 +00:00
Richard Hansen a44debdcfe Add `'` and `*` to acceptable URL characters
These characters are in the RFC3986 reserved set.

These characters are added to the set of characters that cannot be the
last character of a URL to avoid mislinkification.
2020-12-14 07:03:17 +00:00
Richard Hansen 7d23278ed0 Exclude `?`, `!`, and `)` from last character of URL
Now the final character in each of these example strings is no longer
considered part of the URL:
  * Have you seen http://example.com?
  * Look at http://example.com!
  * (see http://example.com)
2020-12-14 07:03:17 +00:00
Richard Hansen 7e8de5540f Factor out common URL regular expression code
This also eliminates the differences between the regular expressions.
2020-12-14 07:03:17 +00:00
Richard Hansen 66d0eb9a1f tests: Expand the tests in `urls_become_clickable.js` 2020-12-14 07:03:17 +00:00
Richard Hansen 1c388ca66e tests: New `helper.clearPad` method 2020-12-14 07:03:17 +00:00
Richard Hansen ca01856f94 lint: Fix some straightforward ESLint errors 2020-12-14 07:03:17 +00:00
Richard Hansen e66e8a4eb2 pad: Fix wrong variable name in global exception handler
This fixes a bug introduced in commit
c845d985e0.
2020-12-10 22:25:58 +00:00
webzwo0i d25010d5d7
pluginfw: explicitly install the latest version of a plugin, fix for #4536 (#4543) 2020-12-05 14:08:02 +00:00
webzwo0i 0c7df88f8a
add rehype-minify-whitespace to package.json (#4544) 2020-12-05 12:16:25 +00:00
John McLear 003363bc89
checkPlugin: dont run sauce labs connector on travis backend tests (#4542) 2020-12-05 08:21:08 +00:00
John McLear ef2de59587
editor: use rehype-minify-whitespace
use rehype-minify-whitespace

Co-authored-by: webzwo0i <webzwo0i@c3d2.de>
2020-12-05 08:14:09 +00:00
John McLear de5e071294 path issue 2020-12-05 07:51:17 +00:00
John McLear 159b6a4ba1 database: bump ueberdb to 056 to ensure correct engine is used 2020-12-05 07:51:17 +00:00
John McLear ee0a37f96c checkPlugins fix travis and include contributing.md 2020-12-05 07:50:16 +00:00
John McLear 239a0bccbd checkPlugins: improve travis config to not error 2020-12-05 07:50:16 +00:00
zonky2 0f1d5e068a
css: Make color button from elipsoid to circle (#4535)
Make color button from elipsoid to circle by own user
https://easycaptures.com/fs/uploaded/1536/3084360130.png
2020-12-05 07:32:15 +00:00
John McLear d1e9ea6e27
tests/plugins: checkPlugins backend tests config
Tnx to @webzwo0i 👍
2020-11-30 17:22:52 +00:00
John McLear 42c0d80914 plugins: checkPlugin script includes remove node_modules if committed. 2020-11-28 13:13:14 +00:00
John McLear 325941a1ad
plugins: add peerdeps and correct engine to checkPlugins script (#4524)
* pere deps example

* fixed by rh

* doh

* doh...
2020-11-27 21:43:23 +00:00
Richard Hansen 5fcf5f6135 checkPlugin.js: Use https, not http, for Etherpad URL 2020-11-27 14:55:51 -05:00
Richard Hansen aa41b0920c admin/plugins: Don't keep adding more Update buttons 2020-11-27 16:59:24 +00:00
Richard Hansen 6a00d7f8d6 admin/plugins: Use jQuery to build the Update button 2020-11-27 16:59:24 +00:00
Richard Hansen 2ddc45bf07 admin/plugins: Simplify jQuery search for plugin actions 2020-11-27 16:59:24 +00:00
Richard Hansen 973644c7dd lint: Fix ESLint errors in `/admin/plugins` code 2020-11-27 16:59:24 +00:00
Richard Hansen 6a5f905090 admin: Delete unused `search_results`
This silences some ESLint camelcase warnings.
2020-11-27 16:59:24 +00:00
Richard Hansen 2fdac836d0 lint: Bump eslint-config-etherpad to 1.0.13
Also bump eslint to 7.14.0.
2020-11-27 06:25:43 +00:00
Richard Hansen 750c7cb1cf pad: Delete unused `ip` and `userAgent` client vars 2020-11-26 15:00:46 +00:00
Richard Hansen 98066184b2 PadMessageHandler: Don't fill in default name or color
It should be the client's responsibility to handle null name or color.
In the case of author names, passing null to the client allows users
to fill in the names of other users (via a suggestUserName
CLIENT_MESSAGE).
2020-11-26 15:00:46 +00:00
Richard Hansen ef7ae15722 PadMessageHandler: Don't send USER_NEWINFO about unknown authors
When a new client opens a socket.io connection and sends a
CLIENT_READY message, Etherpad sends the new client a bunch of
USER_NEWINFO messages, one per other user already connected to the
pad. When iterating over the other users, filter out those without an
author ID or missing from the global authors database.
2020-11-26 15:00:46 +00:00
Richard Hansen 53bc80e381 pad userlist: Use jQuery to create rows
This makes the code easier to read and maintain, and it reduces the
likelihood of introducing an XSS vulnerability.
2020-11-26 15:00:46 +00:00
John McLear 53ac25e9eb tests: include set title on pad in plugins 2020-11-26 14:10:10 +00:00
John McLear 83e28ec031
docs: correct name for callback function 2020-11-26 10:10:43 +00:00
Ilmar Türk ba7d80fa57
Update dropdowns on language change (#4519) 2020-11-25 21:39:21 +00:00
Richard Hansen 5a8f7cf54e test runner: Simplify `getURLParameter()` 2020-11-25 19:19:24 +00:00
Richard Hansen 958f7d8966 lint: Fix most ESLint errors in `runner.js` 2020-11-25 19:19:24 +00:00
Richard Hansen 064fcf8c00 test runner: Pass single argument to `append()`
This makes the strings easier to read, and it simplifies `append()`.

Also fix some lint errors:
  * Use `const` instead of `var`.
  * Convert `append()` to an arrow function.
  * Wrap long lines.
2020-11-25 19:19:24 +00:00
Richard Hansen 1f94ac5600 Incorporate separate PR #4516 commits
https://github.com/ether/etherpad-lite/pull/4516 was accidentally
squash-merged when it should have been rebased and merged (or regular
merged). This merge brings in the separate commits so that the changes
can be easily reviewed in the future.
2020-11-25 13:10:37 -05:00
Richard Hansen 107942ad8a lint: Rerun `eslint --fix` to nuke trailing function call commas
eslint-config-etherpad 1.0.11 changed the comma-dangle rule to
prohibit trailing commas for function arguments. See:
673ab07acf
Re-run the automated fixes to apply the rule change.

This also fixes a few lint issues in changes that were made after
`eslint --fix` was originally run.
2020-11-25 13:09:14 -05:00
Richard Hansen 98967735d5 lint: Bump eslint-config-etherpad to 1.0.11 2020-11-25 13:09:14 -05:00
Richard Hansen e5a3062cbb
tests: Delete trailing commas in function arguments (#4516)
* lint: Bump eslint-config-etherpad to 1.0.11

* lint: Rerun `eslint --fix` to nuke trailing function call commas

eslint-config-etherpad 1.0.11 changed the comma-dangle rule to
prohibit trailing commas for function arguments. See:
673ab07acf
Re-run the automated fixes to apply the rule change.

This also fixes a few lint issues in changes that were made after
`eslint --fix` was originally run.
2020-11-25 09:50:48 +00:00
webzwo0i 0a72459b3d frontend tests: fix trailing comma in runner.js 2020-11-25 09:04:34 +00:00
webzwo0i b98aaf4904
backend tests: change loglevel to WARN (#4514) 2020-11-25 02:20:50 -05:00
Richard Hansen b13004b25a
Minify: Accept single quotes in `ace.js`'s `$$INCLUDE_*(...)` lines (#4513)
This fixes a bug introduced in commit
8e5fd19db2.
2020-11-25 03:40:02 +01:00
Richard Hansen c673a597f8 tests: Fix what appears to be a typo
This fixes a SonarCloud error.
2020-11-24 20:06:12 +00:00
Richard Hansen e247c716c2 editor: Add argument to suppress SonarCloud error
This also makes it easier for devs to understand the expected function
signature.
2020-11-24 20:06:12 +00:00
Richard Hansen d24306ea6a editor: Delete unused `isTimeUp` argument
This fixes a SonarCloud error.
2020-11-24 20:06:12 +00:00
Richard Hansen ed7ba64635 editor: Delete unused `optModFunc` argument 2020-11-24 20:06:12 +00:00
Richard Hansen d0114d4ac2 editor: Delete commented-out code 2020-11-24 20:06:12 +00:00
Richard Hansen bb722763d0 editor: Delete dead code
This silences some SonarCloud errors.
2020-11-24 20:06:12 +00:00
Richard Hansen 8e5fd19db2 lint: Run `eslint --fix` on `src/` 2020-11-24 20:06:12 +00:00
Richard Hansen b8d07a42eb lint: Run `eslint --fix` on `bin/` and `tests/` 2020-11-24 20:06:12 +00:00
Richard Hansen 0625739cb8 lint: Declare variables above their first use
This makes it possible to convert from `var` to `let` without getting
ReferenceErrors.
2020-11-24 20:06:12 +00:00
Richard Hansen 8ea1a1b90a lint: Prevent comments from being interpreted as JSDoc comments 2020-11-24 20:06:12 +00:00
Richard Hansen 7df3ded66f lint: Put opening brace on same line as `function`
Normally I would let `eslint --fix` do this for me, but there's a bug
that causes:

    const x = function ()
    {
      // ...
    };

to become:

    const x = ()
    => {
      // ...
    };

which ESLint thinks is a syntax error. (It probably is; I don't know
enough about the automatic semicolon insertion rules to be confident.)
2020-11-24 20:06:12 +00:00
Richard Hansen cc988bd67b lint: Convert CR+LF line endings to LF 2020-11-24 20:06:12 +00:00
Richard Hansen a78d6605b7 lint: Configure ESLint 2020-11-24 20:06:12 +00:00
webzwo0i b71b606774
tests: Switch from Travis to Github Actions
Travis placed an unnecessary breaking restriction on our tests and failed to respond within 72 hours to our complaint.  This has forced us to introduce Github Actions to manage our testing.  This is hopefully a temporary measure while Travis either gets itself together or we find a non-Github requirement.
2020-11-24 18:12:41 +00:00
Richard Hansen 6665c4693f Clear hang timeout timer when LibreOffice exits
This prevents `npm test` from freezing for two minutes after the tests
complete.

Also switch to an arrow function for the `setTimeout` callback.
2020-11-24 10:04:14 +00:00
Richard Hansen 029f2f765e checkPlugins: Revise `npmpublish.yml`
* Add commentary explaining why things are done the way they are.
  * Delete steps that were added for debugging.
  * Pass `--no-save` when installing `ep_etherpad-lite`.
2020-11-23 19:09:52 +00:00
John McLear c702fdb488
checkPlugins: Support adaptive npmpublish.yml (#4509) 2020-11-23 16:34:26 +00:00
John McLear b167f97048
plugins: include eslint in checkPlugins.js (#4505)
* probably not working but dumping up

* check plugins lint
2020-11-22 14:58:11 +00:00
webzwo0i f2febcfc7e
minify: Fix gzip not triggered for packages (#4491)
* caching_middleware: fix gzip compression not triggered

* packages: If a client sets `Accept-Encoding: gzip`, the responseCache will
include `Content-Encoding: gzip` in all future responses, even
if a subsequent request does not set `Accept-Encoding` or another client
requests the file without setting `Accept-Encoding`.
Fix that.

* caching_middleware: use `test` instead of `match`

* add tests

* make code easier to understand

* make the regex more clear
2020-11-22 09:23:33 +00:00
Richard Hansen 1d491c0059 tests: Clean up Travis runner scripts
* Avoid bashisms.
  * Simplify `sed` of `settings.json`.
  * Wrap long lines.
  * Define and use the conventional log functions.
  * Quote variable expansions.
2020-11-22 09:22:14 +00:00
Richard Hansen c9eb4c72a5 tests: Kill Etherpad and wait for it to exit 2020-11-22 09:22:14 +00:00
Richard Hansen 9abb77e899 tests: Set loglevel to WARN instead of suppressing stdout 2020-11-22 09:22:14 +00:00
Richard Hansen aa3b5d2090 tests: Fix setting loglevel to WARN
`tests/frontend/travis/runner.sh` transforms `settings.json.template`
and overwrites `settings.json`, so creating `settings.json` doesn't
have any effect. Change the Travis setup to mutate
`settings.json.template` instead of `settings.json`.
2020-11-22 09:22:14 +00:00
Richard Hansen a2cac1d849 tests: Factor out LibreOffice installation 2020-11-22 09:22:14 +00:00
John McLear 776eda2d4e
import/export: Kill soffice spawned process after 120 seconds (#4499)
Due to libreoffice being buggy / hanging on certain pdf imports (even in 7.0.3) we should just kill it so it doesn't consume CPU indefinitely.
2020-11-20 18:33:31 -05:00
John McLear 06e0ff3cd3
tests: Test against Safari 13, drop Safari 12 coverage. 2020-11-19 09:06:57 +00:00
Richard Hansen 867fdbd3f9 webaccess: Asyncify `checkAccess` 2020-11-19 09:05:38 +00:00
Richard Hansen a803f570e0 webaccess: Don't export `checkAccess`
Nobody uses it outside of this module.
2020-11-19 09:05:38 +00:00
Richard Hansen 5d585a12d6 webaccess: Fix some ESLint errors 2020-11-19 09:05:38 +00:00
Richard Hansen 4587c0fb4d webaccess: Use a non-capturing regex group 2020-11-19 09:05:38 +00:00
Richard Hansen a05e8198c9
bugfix: Fix bad paren placement in `/javascript` handler (#4496)
* Fix bad paren placement in `/javascript` handler

This fixes a bug introduced in commit
ed5a635f4c.

* add regression test for #4495

* Move `/javascript` test to `specialpages.js`

Co-authored-by: webzwo0i <webzwo0i@c3d2.de>
2020-11-19 08:19:13 +00:00
Richard Hansen 07bcbbd404 pad: Include the stack in the data sent to `/jserror` 2020-11-17 08:02:27 +00:00
Richard Hansen c845d985e0 pad: Pop up an error message on unhandled Promise rejection 2020-11-17 08:02:27 +00:00
Richard Hansen 93c335b3b8 pad: Use a relative URL to simplify
Also avoid creating an unnecessary variable.
2020-11-17 08:02:27 +00:00
translatewiki.net 41d02db023 Localisation updates from https://translatewiki.net. 2020-11-16 15:15:14 +01:00
webzwo0i 1d8e8d3484 terser was not called because mime type did not match 2020-11-15 19:46:48 +00:00
Richard Hansen cedd27e4fe plugins: Default the module name to the plugin name 2020-11-13 20:30:27 +00:00
Richard Hansen afb025030c plugins: Use a log4js logger for npm messages 2020-11-13 20:30:27 +00:00
Richard Hansen 8a918fbc46 plugins: `async`ify more functions 2020-11-13 20:30:27 +00:00
Richard Hansen 9f575ebc84 plugins: Delete unused `ensure` function 2020-11-13 20:30:27 +00:00
Richard Hansen ac5614dadd plugins: Don't export `callInit`
It's unused outside of this module.

Also use an arrow function.
2020-11-13 20:30:27 +00:00
Richard Hansen ba4794cf8a plugins: Call `require('./hooks')` at top level 2020-11-13 20:30:27 +00:00
Richard Hansen 14a9479e69 plugins: Use functions from `fs.promises` 2020-11-13 20:30:27 +00:00
Richard Hansen d624aa936e plugins: Fix plugin name in error messages 2020-11-13 20:30:27 +00:00
Richard Hansen 6c07229d38 docs: Revise plugin documentation 2020-11-13 20:30:27 +00:00
Richard Hansen cc8dbb07fd docs: Wrap long lines
Also add blank lines around section headings and code blocks.
2020-11-13 20:30:27 +00:00
Richard Hansen 6a8563eeab import/export: Simplify exportEtherpadAdditionalContent processing
Also:
  * Improve parallelization
  * Refine the documentation
2020-11-10 23:02:43 +00:00
Richard Hansen 8c55a38582 HTML export: Add missing `)`
This bug was introduced in 68a91f5e24.
2020-11-10 02:51:55 -05:00
Richard Hansen 1ad9b1efbb Update `CHANGELOG.md`
Add new entries and refine wording/formatting of existing entries.
2020-11-10 07:22:22 +00:00
Richard Hansen 68a91f5e24 HTML export: Move `padId` to context object property 2020-11-10 07:13:26 +00:00
webzwo0i f6aed0c9cb
Fix truncation in travis (#4479)
* log to travis every five seconds
* travis: kill etherpad process after tests
2020-11-10 06:59:50 +01:00
John McLear f0da3a0c4c
Update README.md 2020-11-09 08:32:18 +00:00
John McLear 5e7d54a4aa
Update README.md 2020-11-09 08:27:53 +00:00
John McLear 89667f1d4f
update changelog for release (#4475) 2020-11-08 10:03:22 +00:00
John McLear 881d8b8d95
pluginfw: Hook to include additional body in HTML exports (#4469)
* hook, needs docs

* docs
2020-11-06 13:48:59 +00:00
John McLear 3fa58efede
pluginfw: Export .etherpad hooks (#4466)
* export support

* proper prefix

* just a basic example, needs working on still

* docs

* comments shouldnt be hard coded
2020-11-06 13:48:25 +00:00
ilmar d5c5ca224b Fix missing arg handling in html10n.js 2020-11-05 10:38:22 +00:00
Richard Hansen 405e3e3e19 Settings: Don't filter out users based on `password` or `hash`
Some authentication plugins use the users defined in the `users`
object but ignore the `password` and `hash` properties.

This change deletes all of the filtering logic, including the logic
that filters out users that have both `password` and `hash` properties
defined. I could have kept that check, but decided to remove it
because:
  * There's no harm in defining both `hash` and `password`.
  * Allowing both makes it easier to transition from one scheme to
    another.
  * It's fewer lines of code to maintain.
2020-11-04 18:06:08 +00:00
Richard Hansen 6408d2313c webaccess: Be extra paranoid about nullish password
If `settings.json` contains a user without a `password` property then
nobody should be able to log in as that user using the built-in HTTP
basic authentication. This is true both with and without this change,
but before this change it wasn't immediately obvious that a malicious
user couldn't use an empty or null password to log in as such a user.
This commit adds an explicit nullish check and some unit tests to
ensure that an empty or null password will not work if the `password`
property is null or undefined.
2020-11-04 18:06:08 +00:00
Richard Hansen 98de2b0899 Use `contentEditable` for all browsers
This makes it possible to disable `contentEditable` for certain
elements in some circumstances (e.g., on links so that users can click
on them normally).
2020-11-03 19:02:01 +00:00
Richard Hansen 5e2a27a182 Replace `setClassPresence(x, ...)` with `x.classList.toggle(...)` 2020-11-03 19:02:01 +00:00
Richard Hansen 4594608c04 Delete commented-out code 2020-11-03 19:02:01 +00:00
Richard Hansen 91268e14b7 PadMessageHandler: Rename `client` to `socket`
The `client` variable is actually a socket.io Socket object. Rename it
to reduce confusion.
2020-11-02 20:39:08 +00:00
John McLear cfc7e47db0
plugins: Various checkPlugins.js and associated file fixes. (#4439)
This PR makes checkPlugins some what more useful for developers.  

It adds auto npm publish support and various travis improvements among other goodies.
2020-11-02 16:13:24 +00:00
Richard Hansen 35f4c00dfb .travis.yml: Install ep_readonly_guest 2020-11-02 16:10:07 +00:00
Richard Hansen ed5a635f4c Add `req` to EJS render args when possible
This makes it possible for EJS templates and `eejsBlock_*` hook
functions to access the user's express-session state.
2020-11-02 16:05:01 +00:00
Richard Hansen cf43156390 Remove `src/static/js/jquery.js` from `.gitignore`
That file is checked in so there's no reason to ignore it.
2020-11-02 16:03:58 +00:00
translatewiki.net 127923eb54 Localisation updates from https://translatewiki.net. 2020-11-02 12:40:50 +01:00
Gabriel Medeiros Coelho ce77c48475 remove unnecessary conditional
if animationState evaluates to -1 or 0, it would end up in a conditional that assign its value to itself. Since this is redundant, it is better to remove this conditional, to avoid an extra check
2020-11-01 01:41:09 -05:00
Richard Hansen a95145d12c Merge branch 'master' into develop 2020-11-01 01:34:59 -05:00
Richard Hansen 2c8769a6fd Fix typo in session check (sesion -> session)
(cherry picked from commit 4332affba6)
2020-11-01 01:33:00 -05:00
Richard Hansen 2249b9ae19 SessionManager: Fix session expiration check
This bug was introduced in 8b0baa9679.

(cherry picked from commit 3886e95c83)
2020-11-01 01:33:00 -05:00
webzwo0i b67c9cc136
tests: Speed up and fix travis (#4453)
Various test runner fixes.
2020-10-30 10:40:11 +00:00
Richard Hansen b41d9762fa tests: Clear auth hooks before running import/export unit tests
Also fix some ESLint complaints.
2020-10-29 19:06:24 -04:00
Richard Hansen 03d8882383 tests: Clear auth hooks before running socket.io unit tests 2020-10-29 18:53:10 -04:00
Richard Hansen 4829bb8962 tests: Delete unnecessary `describe()` wrapper 2020-10-29 18:53:10 -04:00
Richard Hansen dbe9151d89 tests: Clear hooks before running webaccess tests
Also factor out common test setup code.
2020-10-29 15:33:05 -04:00
Richard Hansen 6961e0e05b .travis.yml: Factor out common plugin install command 2020-10-29 15:32:32 -04:00
Richard Hansen f6516d62ef .travis.yml: Don't install ep_comments_page
The tests need work.
2020-10-29 15:32:32 -04:00
Richard Hansen 8969b6ba7f .travis.yml: Sort plugins 2020-10-29 15:32:32 -04:00
Richard Hansen ef60a4234d .travis.yml: Wrap long plugin install lines 2020-10-29 15:32:32 -04:00
John McLear d21afba45a
security: lockfile lint check (#4446) 2020-10-29 14:07:36 -04:00
John McLear 99d5c7c943
docs: Migrate from Travis-ci.org to .com 2020-10-28 11:05:33 +00:00
webzwo0i 66a3647579 remove broken async inclusion in tar.json 2020-10-27 20:33:09 +00:00
Richard Hansen 2f65987ba2 webaccess: Remove user's password from session info
This prevents the password from being logged or stored in the
database.
2020-10-27 20:30:01 +00:00
chandi 30b1273853 docs: fix key in padUpdate context 2020-10-26 23:43:09 +00:00
translatewiki.net 50c22f0ae4 Localisation updates from https://translatewiki.net. 2020-10-26 15:56:46 +01:00
Viljami Kuosmanen c502ca3259 Use isHttpError utility provided by http-errors
This new utility method was introduced in http-errors v1.8.0. Let's use
that instead of instanceof. This also upgrades the http-errors dependency
2020-10-25 10:45:58 +00:00
Viljami Kuosmanen aef4cce0c9 Use correct constructor for 404,501 error handlers
Fixes error message mentioned in #4378.
2020-10-25 10:45:58 +00:00
Sebastian Castro 5a1110d0d6 Display outline when toolbar button focused 2020-10-25 10:34:51 +00:00
Richard Hansen 193028702d pad: Don't paste when middle-clicking on a link 2020-10-25 07:06:29 +00:00
Andrew Dassonville bee1ae06d8 utils: Fix commit checking on detached HEAD 2020-10-24 16:22:01 -04:00
John McLear cb5fcbb74e
editor: allow paste into links (#3802) 2020-10-24 16:59:03 +01:00
Richard Hansen 36aceb3aba hooks: Rewrite `callAll` and `aCallAll` for consistency
Rewrite the `callAll` and `aCallAll` functions to support all
reasonable hook behaviors and to report errors for unreasonable
behaviors (e.g., calling the callback twice).

Now a hook function like the following works as expected when invoked
by `aCallAll`:

```
exports.myHookFn = (hookName, context, cb) => {
  cb('some value');
  return;
};
```
2020-10-24 16:08:50 +01:00
Richard Hansen 79119baf58 hooks: Call the callback when done
If a hook function neither calls the callback nor returns a
(non-undefined) value then there's no way for the hook system to know
if/when the hook function has finished.
2020-10-24 16:08:50 +01:00
Richard Hansen 55939a0d7e hooks: Delete unused `flatten` function 2020-10-24 16:08:50 +01:00
John McLear b5c759cbac
tests: remove ep_webrtc for now until it's stable 2020-10-24 15:14:30 +01:00
Wouter bd2343f131 Added nl translations for adminpage 2020-10-23 16:18:57 -04:00
John McLear 9f5fb022b9
Create FUNDING.yml 2020-10-23 20:31:17 +01:00
webzwo0i 069e9997dd
tests: 10 sec maximum wait time for timeslider (#4430) 2020-10-23 12:43:38 +01:00
Wouter b3b3040204
docs: Discord channel link in README (#4429) 2020-10-22 16:39:03 +01:00
webzwo0i 047dfcdee9
tests: relaxed constraint on the number of interval triggers (#4427) 2020-10-22 16:01:51 +01:00
translatewiki.net 73dd3ffdf4 Localisation updates from https://translatewiki.net. 2020-10-22 12:58:59 +02:00
webzwo0i 69c7033a86
tests: refactor some frontend tests (#4408)
* don't include sendkeys in index.html as it's included in helper.init
mocha opts: add default timeout and replace ignoreLeaks with checkLeaks,
as the former is deprecated

* introduce helper.edit to write to a pad

* add test to check if helper.edit() supports line numbers

* helper tests: waitFor/waitForPromise seem to be a little bit faster sometimes

* tests: refactor chat.js

* tests: refactor timeslider_numeric_padID

* tests: refactor timeslider_labels

* tests: refactor timeslider_follow

* ensure followContents is enabled, although it should be by default

* timeslider_follow: increase number of revision for Edge

* make textLines() depend on linesDiv()

Co-authored-by: Richard Hansen <rhansen@rhansen.org>

* make linesDiv return standard Array

* use `contain` instead of `indexOf`

* more fixes from the review

* review fixes

* align waitFor and waitForPromise behaviour

* timeslider_follow: check if it's following to the correct lines

* lower expected waitFor/waitForPromise interval check

* disable responsivness and regression test in timeslider_follow

* timeslider_follow: fix Range detection

* more explicit test for linesDiv

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2020-10-21 18:43:17 +01:00
chandi 94cb000e8f
plugins: include more data within padUpdate hook (#4425)
* Including more data at pad update event

* docs: new context fields in padUpdate

Co-authored-by: Pedro Beschorner Marin <pedrobmarin@gmail.com>
2020-10-21 18:04:03 +01:00
webzwo0i 1e7a9e1791
tests: better timeslider follow contents (#4421) 2020-10-21 10:05:58 +01:00
Richard Hansen 0eb0a07914 Use an ellipsis instead of two periods 2020-10-20 11:02:37 +01:00
Richard Hansen 2379ade7e9 Move out pad.modals.reconnecttimer trailing space 2020-10-20 11:02:37 +01:00
Richard Hansen 734fe9c297 Use jQuery methods to build DOM elements 2020-10-20 11:02:37 +01:00
Richard Hansen a2554fff22 pad: Pop up an error message dialog box upon socket.io error 2020-10-20 10:01:49 +01:00
Richard Hansen 5b887396c3 pad: Check for null collabClient in socket.io event handlers 2020-10-20 10:01:49 +01:00
Richard Hansen b1acf6143a pad: Delete do-nothing `sendClientReady` wrapper 2020-10-20 10:01:49 +01:00
Richard Hansen a712ce457d gritter: Treat strings as text, not HTML
This forces users to use jQuery or DOM objects if they want
formatting, which helps avoid XSS vulnerabilities.
2020-10-20 10:01:49 +01:00
Richard Hansen 8463134125 pad: Improve rendering of uncaught exceptions
* Use jQuery to build the message HTML so that special characters in
    the error message, URL, etc. are properly escaped. This helps
    avoid XSS vulnerabilities.
  * Use bold text for the error message to make it stand out.
  * Add a line break between the error message and "in <url> at line
    <line>" so that the error message stands out more.
  * Use `<p>...</p>` instead of `</br>` to separate the parts of the
    popup.
  * Use CSS for spacing instead of `</br>`.
  * Grammar fixes (add a missing comma, "at" instead of "in").
2020-10-20 10:01:49 +01:00
Richard Hansen d35dbaaacc gritter: Accept jQuery or DOM objects for title and text
Teach Gritter to accept anything that jQuery's `.append()` method
accepts for the title and text of a popup message. This makes it
easier to safely build HTML messages with proper escaping of special
characters (to prevent XSS vulnerabilities).
2020-10-20 10:01:49 +01:00
Richard Hansen d680405f58 pad: Include .js URL in `/jserror` error report 2020-10-20 10:01:49 +01:00
translatewiki.net 2a8e11a49a Localisation updates from https://translatewiki.net. 2020-10-19 20:32:27 +02:00
translatewiki.net 105eb2651f Localisation updates from https://translatewiki.net. 2020-10-19 15:14:03 +02:00
Richard Hansen 1dba121aff tests: Tune `waitForPromise()` poll count test some more
Looks like the test machines can be quite slow, which causes noise in
the count.
2020-10-14 18:16:20 +01:00
Richard Hansen e0542f903a tests: Tune `waitForPromise()` poll count test
This should have been done in c222fc5d0b
but I forgot.
2020-10-14 16:59:03 +01:00
Richard Hansen 3e14016214 tests: Include the filename in the test output
Also some minor consistency cleanups.
2020-10-14 11:16:39 +01:00
Richard Hansen 50e402193b tests: `waitForPromise()` test improvements
* Avoid a false positive if a Promise that is expected to reject
    doesn't reject.
  * Use modern JavaScript language features: arrow functions,
    `const`/`let` instead of `var`.
  * Remove the tests that test Promise behavior.
  * Add new test that checks that it returns a Promise.
2020-10-14 10:38:52 +01:00
webzwo0i a3f062af96 tests: add waitForPromise method and test for it 2020-10-14 10:38:52 +01:00
webzwo0i 86c0648ede tests: don't force a callback in it, so we can use async in tests 2020-10-14 10:38:52 +01:00
Richard Hansen c222fc5d0b tests: Change `waitFor()` to check before first sleep
There are a few problems with sleeping before checking the condition
for the first time:

  * It slows down tests.
  * The predicate is never checked if the interval duration is greater
    than the timeout.
  * 0 can't be used to test if the condition is currently true.

There is a minor disadvantage to sleeping before checking: It will
cause more tests to run without an asynchronous interruption, which
could theoretically mask some async bugs.
2020-10-14 10:38:52 +01:00
Richard Hansen 8016bd225f tests: Teach `waitFor()` to reject if the predicate throws 2020-10-14 10:38:52 +01:00
Richard Hansen 262eb9af60 tests: Use default arguments for `helper.waitFor`
Now `helper.waitFor(fn, 0)` times out immediately (as expected in
tests) instead of waiting 1900ms.
2020-10-14 10:38:52 +01:00
Richard Hansen 16b0768a93 tests: Fix unchainable `helper.waitFor().fail()`
The `helper.waitFor()` function returns a jQuery Deferred object.
Deferred objects are supposed to have a `.fail()` method that is
chainable (it should return `this`). Before this change,
`helper.waitFor()` monkey-patched the `.fail()` method with a function
that returned `undefined`. Now the monkey-patched `.fail()` returns
the Deferred object.

Also modernize the code a bit.
2020-10-14 10:38:52 +01:00
Richard Hansen 4a25559a2d tests: Aggressively filter out non-.js files
This prevents errors when the directory contains Emacs backup files.
2020-10-14 10:38:52 +01:00
Richard Hansen 7f79d201e6 CSP: Move `index.html` inline code to separate `.js` file 2020-10-12 20:46:06 +01:00
translatewiki.net 09193150b6 Localisation updates from https://translatewiki.net. 2020-10-12 15:48:55 +02:00
Richard Hansen a4927095ae CSP: Disable the indexCustomInlineScripts hook 2020-10-11 20:31:00 +01:00
Richard Hansen 052fbb944f
plugins: Delete noisy and useless debug message (#4409)
The debug statement mostly printed the following useless message over
and over, causing Travis CI logs to become truncated:

    [DEBUG] pluginfw - [ undefined ] returning
2020-10-11 09:51:53 +01:00
webzwo0i a2328cd7f0
timeslider: bugfix: follow pad contents - only goToLineNumber if it exists (#4390) 2020-10-10 16:57:22 +01:00
Richard Hansen 048bd0f50d tests: Simplify API key reading
Also delete unused imports.
2020-10-08 22:50:18 +01:00
translatewiki.net ce0b151159 Localisation updates from https://translatewiki.net. 2020-10-08 15:53:01 +02:00
John McLear 66df0a572f
Security: FEATURE REMOVAL: Remove all plain text password logic and ui (#4178)
This will be a breaking change for some people.  

We removed all internal password control logic.  If this affects you, you have two options:

1. Use a plugin for authentication and use session based pad access (recommended).
1. Use a plugin for password setting.

The reasoning for removing this feature is to reduce the overall security footprint of Etherpad.  It is unnecessary and cumbersome to keep this feature and with the thousands of available authentication methods available in the world our focus should be on supporting those and allowing more granual access based on their implementations (instead of half assed baking our own).
2020-10-07 13:43:54 +01:00
Richard Hansen 45bee54aa0 HTML export: Await async hook completion before processing results 2020-10-07 10:43:38 +01:00
Richard Hansen 661a89355f socketio: Mimic what Express does to get client IP address
This also makes it easier for plugins to get the client IP address.
2020-10-07 10:40:37 +01:00
Richard Hansen ba6bdf35be Make the aceAttribClasses hook harder to misuse 2020-10-07 10:37:56 +01:00
Richard Hansen 5aa318a09b Call the aceAttribClasses hook synchronously
We could instead await the results of the hook, but then all callers
and their callers recursively would have to be converted to async, and
that's a huge change.
2020-10-07 10:37:56 +01:00
John McLear 92d4b8b649
tests: re-enable docker tests in travis (#4395)
Thanks to node10 having better support we can re-enable these tests.
2020-10-06 14:21:09 +01:00
jeanfabrice 52f8fc9ba3
legacySupport: Run node 10 with '--experimental_worker' flags (#4392)
* Run node 10 with '--experimental_worker' flags
* Use dedicated function to retrieve node/npm program version

The goal of this commit is to ensure that any linux based node 10 deployments run with the experimental_worker flag.  This flag is required for workers to "work" in node 10.  This will not affect other versions of node.  This resolves #4335 where Docker would fail due to being based on node 10.
2020-10-06 13:28:11 +01:00
Richard Hansen c74b254334 tests: Disable non-test logging unless level <= DEBUG
This makes it easier to see the test results, and it hides some
scary-looking but intentional error messages.

This code will likely have to be updated if/when we change the logging
library (see issue #1922).
2020-10-06 09:19:58 +01:00
Richard Hansen 34b232d658
Update `CHANGELOG.md` with the changes so far (#4393) 2020-10-06 09:16:21 +02:00
Richard Hansen a8cf434d1d import: Replace the `allowAnyoneToImport` check with `userCanModify`
This reduces the number of hoops a user or tool must jump through to
import.
2020-10-05 18:48:16 +01:00
Richard Hansen 831528e8bc import: Allow import if pad does not yet exist 2020-10-05 18:48:16 +01:00
Richard Hansen ed6fcefb67 webaccess: Fix pad ID extraction for import and export paths 2020-10-05 18:48:16 +01:00
Richard Hansen f4eae40c6b webaccess: Check for read-only pad ID in `userCanModify`
This currently isn't absolutely necessary because all current callers
of `userCanModify` already check for a read-only pad ID themselves.
However:

  * This adds defense in depth.
  * This makes it possible to simply replace the import handler's
    `allowAnyoneToImport` check with a call to `userCanModify`.
2020-10-05 18:48:16 +01:00
Richard Hansen 9a6f286441 tests: Always run the import unsupported file type test 2020-10-05 18:48:16 +01:00
Richard Hansen 2f17849b7b tests: Switch import/export tests to self-contained server
This makes it possible to test various settings combinations and
examine internal state to confirm correct behavior. Also, the user
doesn't need to start an Etherpad server before running these tests.
2020-10-05 18:48:16 +01:00
Richard Hansen 32b6d8e37f tests: Factor out common server setup/teardown 2020-10-05 18:48:16 +01:00
Richard Hansen 377560eb51 express: Move general Express setup from `webaccess.js`
The `express-session`, `cookie-parser`, etc. middleware is not
specific to access checks.
2020-10-05 18:12:04 +01:00
Richard Hansen 821c06cc3a socketio: Reuse the `express-session` middleware 2020-10-05 18:12:04 +01:00
Richard Hansen f7953ece85 socketio: Delete redundant authentication check
There's no need to perform an authentication check in the socket.io
middleware because `PadMessageHandler.handleMessage` calls
`SecurityMananger.checkAccess` and that now performs authentication
and authorization checks.

This change also improves the user experience: Before, access denials
caused socket.io error events in the client, which `pad.js` mostly
ignores (the user doesn't see anything). Now a deny message is sent
back to the client, which causes `pad.js` to display an obvious
permission denied message.

This also fixes a minor bug: `settings.loadTest` is supposed to bypass
authentication and authorization checks, but they weren't bypassed
because `SecurityManager.checkAccess` did not check
`settings.loadTest`.
2020-10-05 18:12:04 +01:00
Richard Hansen 3f8365a995 express: Use `const` and `let` instead of `var`
Also:
  * Sort imports.
  * Use single quotes.
  * Abbreviate module names.
2020-10-05 18:12:04 +01:00
Richard Hansen b68969fbac webaccess: Simplify Express and express-session setup 2020-10-05 18:12:04 +01:00
Richard Hansen 275e5c31c8 webaccess: Wrap long lines 2020-10-05 18:12:04 +01:00
translatewiki.net 29ee63f2ba Localisation updates from https://translatewiki.net. 2020-10-05 15:56:29 +02:00
Richard Hansen 2db4b04af3 cookies: Use `SameSite=None` if in an iframe from another site 2020-10-04 08:57:44 +01:00
Richard Hansen bf53162cdd cookies: Use `Lax` instead of `Strict` for `SameSite` 2020-10-04 08:57:44 +01:00
Richard Hansen 3ab0f30ac8 cookies: Use js-cookie to read and write cookies
Rather than reinvent the wheel, use a well-tested library to parse and
write cookies. This should also help prevent XSS vulnerabilities
because the library handles special characters such as semicolon.
2020-10-04 08:57:44 +01:00
Richard Hansen d55edebddd cookies: Refactor `pad_cookie.js`
* Use the cookie functions from `pad_utils.js`.
  * Delete unused methods, variables, and parameters.
  * Simplify the logic.
  * Use an ES6 class instead of a weird literal thingy.
  * Use `const` instead of `var`.
2020-10-04 08:57:44 +01:00
translatewiki.net 891d2600fa Localisation updates from https://translatewiki.net. 2020-10-02 09:05:33 +02:00
webzwo0i ceb09ce99a
security: Support proxy with rate limiting and include CI test coverage for nginx rev proxy (#4373)
Previously Etherpad would not pass the correct client IP address through and this caused the rate limiter to limit users behind reverse proxies.  This change allows Etherpad to use a client IP passed from a reverse proxy.

Note to devs: This header can be spoofed and spoofing the header could be used in an attack.  To mitigate additional *steps should be taken by Etherpad site admins IE doing rate limiting at proxy.*  This only really applies to large scale deployments but it's worth noting.
2020-10-01 10:39:01 +01:00
Richard Hansen dbef630f44
i18n: Localize `/admin` pages (#4380)
Not every string was localized:

  * `/admin/plugins` has some CSS magic to draw the tables of plugins
    differently on narrow (mobile) screens, and the l10n library we
    use does not support that particular magic. The strings that were
    not localized are "Name", "Description", "Version", and "Time".
    These strings are only stuck in English when the page is viewed on
    a narrow screen; normal desktop users will see translated strings.
    The CSS magic ought to be replaced with something more robust
    (lots of nested `div`s); those remaining strings can be localized
    whenever that happens.

  * Strings from external sources such as plugin descriptions, error
    messages, and `settings.json` comments are not localized.
2020-10-01 10:15:27 +01:00
Richard Hansen 554eef7770 webaccess: Exempt `/favicon.ico` and `/locales.json` from auth checks 2020-09-29 19:40:24 +01:00
John McLear 5964055dec
package updates: update deps and resolve some potential security issues (#4369) 2020-09-29 13:21:35 +01:00
translatewiki.net 837ca6ec1e Localisation updates from https://translatewiki.net. 2020-09-28 17:15:23 +02:00
Richard Hansen bf9d613e95
feature: New user-specific `readOnly` and `canCreate` settings (#4370)
Also:
  * Group the tests for readability.
  * Factor out some common test setup.
2020-09-28 11:22:06 +01:00
Richard Hansen 7bd5435f50 webaccess: Log hook errors 2020-09-28 09:35:42 +01:00
John McLear 8919608d45 tests: disable a version of safari for now as its too buggy on sauce labs 2020-09-27 23:13:29 +01:00
Richard Hansen 180983736d security: Enable authorize plugins to grant read-only access 2020-09-27 22:55:49 +01:00
John McLear 505d67ed1c allowing longer for FF to do timeslider rev test 2020-09-27 21:44:43 +01:00
Richard Hansen 304318b618 webaccess: Move pre-authn authz check to a separate hook
Before this change, the authorize hook was invoked twice: once before
authentication and again after (if settings.requireAuthorization is
true). Now pre-authentication authorization is instead handled by a
new preAuthorize hook, and the authorize hook is only invoked after
the user has authenticated.

Rationale: Without this change it is too easy to write an
authorization plugin that is too permissive. Specifically:

  * If the plugin does not check the path for /admin then a non-admin
    user might be able to access /admin pages.
  * If the plugin assumes that the user has already been authenticated
    by the time the authorize function is called then unauthenticated
    users might be able to gain access to restricted resources.

This change also avoids calling the plugin's authorize function twice
per access, which makes it easier for plugin authors to write an
authorization plugin that is easy to understand.

This change may break existing authorization plugins: After this
change, the authorize hook will no longer be able to authorize
non-admin access to /admin pages. This is intentional. Access to admin
pages should instead be controlled via the `is_admin` user setting,
which can be set in the config file or by an authentication plugin.

Also:
  * Add tests for the authenticate and authorize hooks.
  * Disable the authentication failure delay when testing.
2020-09-27 21:19:58 +01:00
John McLear a51132d712
tests: test coverage for read only pad ids (#4364) 2020-09-27 19:12:11 +01:00
John McLear 53b80d6280
tests: adding a check before finishing responsiveness test - allowing load test to run for 25 instead of 30 seconds to facilitate travis performance. (#4363)
The goal of this PR is to make tests break less frequently.  It is yet confirmed if this has worked but time will tell.
2020-09-27 15:13:55 +01:00
Richard Hansen 411b278881 webaccess: Log all authentication successes/failures
This loses some of the granularity of the default HTTP basic auth
(unknown username vs. bad password), but there is considerable value
in having logging that is consistent no matter what authentication
plugins are installed.
2020-09-26 21:57:50 +01:00
John McLear ea4b9bf7d7
tests: support even slower safari (#4361) 2020-09-26 21:57:21 +01:00
Pedro Beschorner Marin c56973ce74 Fix readOnly pad export
The export request hook wasn't testing if the pad's id was from a read-only
pad before validating with the pad manager.

This includes an extra step that makes the read-only id verification and also
avoids setting the original pad's id as the file's name.
2020-09-26 21:47:35 +01:00
Richard Hansen 9f63d9b76a tests: Check for true/false, not truthiness 2020-09-26 21:40:19 +01:00
Richard Hansen c18831c333 tests: Fix typo (publicstatus -> publicStatus) 2020-09-26 21:40:19 +01:00
Richard Hansen e01e575c86 tests: Use async/await instead of callbacks, use assert 2020-09-26 21:40:19 +01:00
Richard Hansen 24345bf9a8 tests: Group session and group tests to improve readability 2020-09-26 21:40:19 +01:00
Richard Hansen 4527254bcc tests: Use `let` and `const` instead of `var` 2020-09-26 21:40:19 +01:00
Richard Hansen e88c532172 tests: Delete unused variable 2020-09-26 21:40:19 +01:00
John McLear 90adc50289
tests: Include some plugins in tests (#4339)
This PR introduces testing of plugins from the ether/ organization on Github.  Each plugin is added into ``.travis``.  Frontend plugins tests are run exclusive to core tests.  Backend runs both core and plugins with core.

Including frontend core tests with plugin tests caused the session to overrun causing errors.
2020-09-26 19:41:33 +01:00
Richard Hansen ab5934cbda webaccess: Split authFailure hook into authnFailure and authzFailure
This makes it possible for plugins to return different pages to the
user depending on whether the auth failure was authn or authz.
2020-09-26 19:37:11 +01:00
Richard Hansen 889a3f7261 Bump Etherpad version in src/package-lock.json 2020-09-26 19:37:05 +01:00
Richard Hansen 3bb71e14d1 PadMessageHandler: Logging improvements 2020-09-26 19:36:52 +01:00
Richard Hansen 4332affba6 Fix typo in session check (sesion -> session) 2020-09-26 19:36:44 +01:00
Richard Hansen 02757079c0 security: Enable authorize plugins to grant modify-only access 2020-09-26 18:36:36 +01:00
Richard Hansen 6ed11b7605 PadMessageHandler: Avoid redundant access checks 2020-09-26 18:32:22 +01:00
Richard Hansen 1e3aa9edff pad: Revert back to sending `CLIENT_READY` on reconnect
Commit 0bb8d73ba2 fixed the author ID
that is saved in the socket.io sessioninfo when the client sends a
`CLIENT_READY` with `reconnect` set to true, so it is now safe to undo
the workaround from PR #3868.

Fixes #4331.
2020-09-26 18:32:04 +01:00
Richard Hansen 72ed1816ec security: Fix authz check for pad names with encoded characters
Also:
  * Minor test cleanups (`function` instead of arrow functions, etc.).
  * Add a test for a case that was previously not covered.
2020-09-26 10:47:27 +01:00
Richard Hansen 3c9ae57bb3 PadMessageHandler: Block Promise resolution until message is handled
Benefits:
  * More functions are now async which makes it possible for future
    changes to use await in those functions.
  * This will help keep the server from drowning in too many messages
    if we ever add acknowledgements or if WebSocket backpressure ever
    becomes reality.
  * This might make tests less flaky because changes triggered by a
    message will complete before the Promise resolves.
2020-09-26 10:47:03 +01:00
Richard Hansen 23131a501c tests: Rewrite import/export tests to use async and supertest 2020-09-26 10:46:16 +01:00
Richard Hansen 54c999fe83 tests: Factor out common skip checks 2020-09-26 10:46:16 +01:00
Richard Hansen 1c3c5b744c tests: Skip all import/export tests if `!allowAnyoneToImport`
Three of the four tests fail if `settings.allowAnyoneToImport` is
false. The fourth ("tries to import Plain Text to a pad that does not
exist") isn't particularly useful when `settings.allowAnyoneToImport`
is false: That test tests an import failure mode, and when
`settings.allowAnyoneToImport` is false the failure could be caused by
that instead of the expected cause.
2020-09-26 10:46:16 +01:00
Richard Hansen c148e673a8 tests: Use `this.skip()` when skipping tests 2020-09-26 10:46:16 +01:00
Richard Hansen 668373b80f tests: Fix abiword/soffice check 2020-09-26 10:46:16 +01:00
Richard Hansen 89de03795a tests: Delete unused imports and code 2020-09-26 10:46:16 +01:00
Richard Hansen 0bb8d73ba2 PadMessageHandler: Always save the author ID in the session info
Before, the author ID was only saved in the session info during the
initial CLIENT_READY, not when the client sent a CLIENT_READY due to a
reconnect. This caused the handling of subsequent messages to use an
undefined author ID.
2020-09-26 10:43:06 +01:00
translatewiki.net 6cde6f5a98 Localisation updates from https://translatewiki.net. 2020-09-24 15:54:49 +02:00
Richard Hansen 94f944160d security: Don't require express_sid if authn not required
This should make it possible to embed a pad in an iframe from another
site as long as `settings.requireAuthentication` is false.
2020-09-24 10:42:41 +01:00
Richard Hansen 53fd0b4f98 webaccess: Return 401 for authn failure, 403 for authz failure
This makes it possible for reverse proxies to transform 403 errors
into something like "upgrade to a premium account to access this
pad".

Also add some webaccess tests.
2020-09-24 10:41:58 +01:00
John McLear ff4da04907 no need to ask for translations if no template files are included 2020-09-23 09:25:17 +01:00
Richard Hansen 1bb44098df PadMessageHandler: Move handleMessage hooks after access check
Move the handleMessageSecurity and handleMessage hooks after the call
to securityManager.checkAccess.

Benefits:

  * A handleMessage plugin can safely assume the message will be
    handled unless the plugin itself drops the message, so it doesn't
    need to repeat the access checks done by the `handleMessage`
    function.
  * This paves the way for a future enhancement: pass the author ID to
    the hooks.

Note: The handleMessageSecurity hook is broken in several ways:

  * The hook result is ignored for `CLIENT_READY` and `SWITCH_TO_PAD`
    messages because the `handleClientReady` function overwrites the
    hook result. This causes the client to receive client vars with
    `readonly` set to true, which causes the client to display an
    immutable pad even though the pad is technically writable.
  * The formatting toolbar buttons are removed for read-only pads
    before the handleMessageSecurity hook even runs.
  * It is awkwardly named: Without reading the documentation, how is
    one supposed to know that "handle message security" actually means
    "grant one-time write access to a read-only pad"?
  * It is called for every message even though calls after a
    `CLIENT_READY` or `SWITCH_TO_PAD` are mostly pointless.
  * Why would anyone want to grant write access when the user visits a
    read-only pad URL? The user should just visit the writable pad URL
    instead.
  * Why would anyone want to grant write access that only lasts for a
    single socket.io connection?
  * There are better ways to temporarily grant write access (e.g., the
    authorize hook).
  * This hook is inviting bugs because it breaks a core assumption
    about `/p/r.*` URLs.

I think the hook should be deprecated and eventually removed.
2020-09-23 08:26:47 +01:00
Richard Hansen 0f6baac7b5
Revert "tests: Use wtfnode to determine why mocha isn't exiting" (#4315)
This reverts commit ae1142a799.

According to
https://github.com/ether/etherpad-lite/pull/4304#issuecomment-694833456
wtfnode always seems to exit with 0 even if the tests fail.
2020-09-22 22:47:26 +01:00
John McLear ca7b8e278f allow slower for Safari 2020-09-22 16:32:40 +01:00
618 changed files with 61205 additions and 50200 deletions

View File

@ -19,6 +19,7 @@ Dockerfile
.git/ORIG_HEAD
.git/packed-refs
.git/refs/remotes/
.git/rr-cache/
.gitignore
settings.json

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
* text=auto eol=lf

3
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,3 @@
# These are supported funding model platforms
github: ether

View File

@ -7,6 +7,8 @@ assignees: ''
---
<!-- IMPORTANT: Please disable plugins prior to posting a bug report. If you have a problem with a plugin please post on the plugin repository. Thanks! -->
**Describe the bug**
A clear and concise description of what the bug is.
@ -23,6 +25,13 @@ A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Server (please complete the following information):**
- Etherpad version:
- OS: [e.g., Ubuntu 20.04]
- Node.js version (`node --version`):
- npm version (`npm --version`):
- Is the server free of plugins:
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]

View File

@ -1,29 +1,13 @@
<!--
Some key notes before you open a PR:
1. If you haven't already, please read https://github.com/ether/etherpad-lite/blob/master/CONTRIBUTING.md#pull-requests .
2. Run all the tests, both front-end and back-end. (see https://github.com/ether/etherpad-lite/blob/master/CONTRIBUTING.md#testing)
3. Keep business logic and validation on the server-side.
4. Update documentation.
5. Write `fixes #XXXX` in your comment to auto-close an issue.
1. Select which branch should this PR be merged in? By default, you should always merge to the develop branch.
2. PR name follows [convention](http://karma-runner.github.io/4.0/dev/git-commit-msg.html)
3. All tests pass locally, UI and Unit tests
4. All business logic and validations must be on the server-side
5. Update necessary Documentation
6. Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes
Also, if you're new here
- Contribution Guide => https://github.com/ether/etherpad-lite/blob/master/CONTRIBUTING.md
If you're making a big change, please explain what problem it solves:
- Explain the purpose of the change. When adding a way to do X, explain why it is important to be able to do X.
- Show the current vs desired behavior with screenshots/GIFs.
-->
> Please provide enough information so that others can review your pull request:
<!-- You can skip this if you're fixing a typo or updating existing documentation -->
> Explain the **details** for making this change. What existing problem does the pull request solve?
<!-- Example: When "Adding a function to do X", explain why it is necessary to have a way to do X. -->
> Screenshots/GIFs
<!-- Add images/recordings to better visualize the change: expected/current behviour -->

21
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,21 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/src"
schedule:
interval: "daily"
versioning-strategy: "increase"
- package-ecosystem: "npm"
directory: "/src/bin/doc"
schedule:
interval: "daily"
versioning-strategy: "increase"

23
.github/stale.yml vendored
View File

@ -1,23 +0,0 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
- Bug
- Serious Bug
- Minor bug
- Black hole bug
- Special case Bug
- Upstream bug
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

203
.github/workflows/backend-tests.yml vendored Normal file
View File

@ -0,0 +1,203 @@
name: "Backend tests"
# any branch is useful for testing before a PR is submitted
on: [push, pull_request]
permissions:
contents: read
jobs:
withoutpluginsLinux:
# run on pushes to any branch
# run on PRs from external forks
if: |
(github.event_name != 'pull_request')
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
name: Linux without plugins
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [16, 18, 20]
steps:
-
name: Checkout repository
uses: actions/checkout@v4
-
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install libreoffice
run: |
sudo add-apt-repository -y ppa:libreoffice/ppa
sudo apt update
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh
-
name: Run the backend tests
run: cd src && npm test
withpluginsLinux:
# run on pushes to any branch
# run on PRs from external forks
if: |
(github.event_name != 'pull_request')
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
name: Linux with Plugins
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [16, 18, 20]
steps:
-
name: Checkout repository
uses: actions/checkout@v4
-
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install libreoffice
run: |
sudo add-apt-repository -y ppa:libreoffice/ppa
sudo apt update
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
-
name: Install Etherpad plugins
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
# https://github.com/npm/cli/issues/2199
run: >
npm install --no-save --legacy-peer-deps
ep_align
ep_author_hover
ep_cursortrace
ep_font_size
ep_hash_auth
ep_headings2
ep_image_upload
ep_markdown
ep_readonly_guest
ep_set_title_on_pad
ep_spellcheck
ep_subscript_and_superscript
ep_table_of_contents
# Etherpad core dependencies must be installed after installing the
# plugin's dependencies, otherwise npm will try to hoist common
# dependencies by removing them from src/node_modules and installing them
# in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
# to be buggy, because it sometimes removes dependencies from
# src/node_modules but fails to add them to the top-level node_modules.
# Even if npm correctly hoists the dependencies, the hoisting seems to
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
# rules.
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh
-
name: Run the backend tests
run: cd src && npm test
withoutpluginsWindows:
# run on pushes to any branch
# run on PRs from external forks
if: |
(github.event_name != 'pull_request')
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
name: Windows without plugins
runs-on: windows-latest
steps:
-
name: Checkout repository
uses: actions/checkout@v4
-
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installOnWindows.bat
-
name: Fix up the settings.json
run: |
powershell -Command "(gc settings.json.template) -replace '\"max\": 10', '\"max\": 10000' | Out-File -encoding ASCII settings.json.holder"
powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
-
name: Run the backend tests
run: cd src && npm test
withpluginsWindows:
# run on pushes to any branch
# run on PRs from external forks
if: |
(github.event_name != 'pull_request')
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
name: Windows with Plugins
runs-on: windows-latest
steps:
-
name: Checkout repository
uses: actions/checkout@v4
-
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install Etherpad plugins
# The --legacy-peer-deps flag is required to work around a bug in npm
# v7: https://github.com/npm/cli/issues/2199
run: >
npm install --no-save --legacy-peer-deps
ep_align
ep_author_hover
ep_cursortrace
ep_font_size
ep_hash_auth
ep_headings2
ep_image_upload
ep_markdown
ep_readonly_guest
ep_set_title_on_pad
ep_spellcheck
ep_subscript_and_superscript
ep_table_of_contents
# Etherpad core dependencies must be installed after installing the
# plugin's dependencies, otherwise npm will try to hoist common
# dependencies by removing them from src/node_modules and installing them
# in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
# to be buggy, because it sometimes removes dependencies from
# src/node_modules but fails to add them to the top-level node_modules.
# Even if npm correctly hoists the dependencies, the hoisting seems to
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
# rules.
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installOnWindows.bat
-
name: Fix up the settings.json
run: |
powershell -Command "(gc settings.json.template) -replace '\"max\": 10', '\"max\": 10000' | Out-File -encoding ASCII settings.json.holder"
powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
-
name: Run the backend tests
run: cd src && npm test

View File

@ -9,46 +9,36 @@ on:
schedule:
- cron: '0 13 * * 1'
permissions:
contents: read
jobs:
analyze:
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/autobuild to send a status report
name: Analyze
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
-
name: Checkout repository
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
-
run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
-
name: Initialize CodeQL
uses: github/codeql-action/init@v2
-
name: Autobuild
uses: github/codeql-action/autobuild@v2
-
name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

20
.github/workflows/dependency-review.yml vendored Normal file
View File

@ -0,0 +1,20 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Reqest, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
on: [pull_request]
permissions:
contents: read
jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3

91
.github/workflows/docker.yml vendored Normal file
View File

@ -0,0 +1,91 @@
name: Docker
on:
pull_request:
push:
branches:
- 'develop'
tags:
- 'v?[0-9]+.[0-9]+.[0-9]+'
env:
TEST_TAG: etherpad/etherpad:test
permissions:
contents: read
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Check out
uses: actions/checkout@v4
-
name: Set up QEMU
if: github.event_name == 'push'
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build and export to Docker
uses: docker/build-push-action@v5
with:
context: .
load: true
tags: ${{ env.TEST_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
-
name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Test
run: |
docker run --rm -d -p 9001:9001 --name test ${{ env.TEST_TAG }}
docker logs -f test &
./src/bin/installDeps.sh
while true; do
echo "Waiting for Docker container to start..."
status=$(docker container inspect -f '{{.State.Health.Status}}' test) || exit 1
case ${status} in
healthy) break;;
starting) sleep 2;;
*) printf %s\\n "unexpected status: ${status}" >&2; exit 1;;
esac
done
(cd src && npm run test-container)
git clean -dxf .
-
name: Docker meta
if: github.event_name == 'push'
id: meta
uses: docker/metadata-action@v5
with:
images: etherpad/etherpad
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
-
name: Log in to Docker Hub
if: github.event_name == 'push'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
if: github.event_name == 'push'
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@ -0,0 +1,96 @@
# Leave the powered by Sauce Labs bit in as this means we get additional concurrency
name: "Frontend admin tests powered by Sauce Labs"
on: [push]
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
withplugins:
if: ${{ github.actor != 'dependabot[bot]' }}
name: with plugins
runs-on: ubuntu-latest
# node: [16, 19, 20] >> Disabled node 16 and 18 because they do not work
strategy:
fail-fast: false
matrix:
node: [19, 20]
steps:
-
name: Generate Sauce Labs strings
id: sauce_strings
run: |
printf %s\\n '::set-output name=name::${{ github.workflow }} - ${{ github.job }} - Node ${{ matrix.node }}'
printf %s\\n '::set-output name=tunnel_id::${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}-node${{ matrix.node }}'
-
name: Checkout repository
uses: actions/checkout@v4
-
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install etherpad plugins
# We intentionally install an old ep_align version to test upgrades to
# the minor version number. The --legacy-peer-deps flag is required to
# work around a bug in npm v7: https://github.com/npm/cli/issues/2199
run: npm install --no-save --legacy-peer-deps ep_align@0.2.27
# Etherpad core dependencies must be installed after installing the
# plugin's dependencies, otherwise npm will try to hoist common
# dependencies by removing them from src/node_modules and installing them
# in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
# to be buggy, because it sometimes removes dependencies from
# src/node_modules but fails to add them to the top-level node_modules.
# Even if npm correctly hoists the dependencies, the hoisting seems to
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
# rules.
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh
-
name: Install etherpad plugins
run: rm -Rf node_modules/ep_align/static/tests/*
-
name: export GIT_HASH to env
id: environment
run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
-
name: Create settings.json
run: cp settings.json.template settings.json
-
name: Write custom settings.json that enables the Admin UI tests
run: "sed -i 's/\"enableAdminUITests\": false/\"enableAdminUITests\": true,\\n\"users\":{\"admin\":{\"password\":\"changeme\",\"is_admin\":true}}/' settings.json"
-
name: increase maxHttpBufferSize
run: "sed -i 's/\"maxHttpBufferSize\": 10000/\"maxHttpBufferSize\": 100000/' settings.json"
-
name: Disable import/export rate limiting
run: |
sed -e '/^ *"importExportRateLimiting":/,/^ *\}/ s/"max":.*/"max": 1000000/' -i settings.json
-
name: Remove standard frontend test files, so only admin tests are run
run: mv src/tests/frontend/specs/* /tmp && mv /tmp/admin*.js src/tests/frontend/specs
-
uses: saucelabs/sauce-connect-action@v2.3.5
with:
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
tunnelIdentifier: ${{ steps.sauce_strings.outputs.tunnel_id }}
-
name: Run the frontend admin tests
shell: bash
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
SAUCE_NAME: ${{ steps.sauce_strings.outputs.name }}
TRAVIS_JOB_NUMBER: ${{ steps.sauce_strings.outputs.tunnel_id }}
GIT_HASH: ${{ steps.environment.outputs.sha_short }}
run: |
src/tests/frontend/travis/adminrunner.sh

151
.github/workflows/frontend-tests.yml vendored Normal file
View File

@ -0,0 +1,151 @@
# Leave the powered by Sauce Labs bit in as this means we get additional concurrency
name: "Frontend tests powered by Sauce Labs"
on: [push]
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
withoutplugins:
name: without plugins
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
-
name: Generate Sauce Labs strings
id: sauce_strings
run: |
printf %s\\n '::set-output name=name::${{ github.workflow }} - ${{ github.job }}'
printf %s\\n '::set-output name=tunnel_id::${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}'
-
name: Checkout repository
uses: actions/checkout@v4
-
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh
-
name: export GIT_HASH to env
id: environment
run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
-
name: Create settings.json
run: cp settings.json.template settings.json
-
name: Disable import/export rate limiting
run: |
sed -e '/^ *"importExportRateLimiting":/,/^ *\}/ s/"max":.*/"max": 100000000/' -i settings.json
-
uses: saucelabs/sauce-connect-action@v2.3.5
with:
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
tunnelIdentifier: ${{ steps.sauce_strings.outputs.tunnel_id }}
-
name: Run the frontend tests
shell: bash
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
SAUCE_NAME: ${{ steps.sauce_strings.outputs.name }}
TRAVIS_JOB_NUMBER: ${{ steps.sauce_strings.outputs.tunnel_id }}
GIT_HASH: ${{ steps.environment.outputs.sha_short }}
run: |
src/tests/frontend/travis/runner.sh
withplugins:
name: with plugins
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
-
name: Generate Sauce Labs strings
id: sauce_strings
run: |
printf %s\\n '::set-output name=name::${{ github.workflow }} - ${{ github.job }}'
printf %s\\n '::set-output name=tunnel_id::${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}'
-
name: Checkout repository
uses: actions/checkout@v4
-
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install Etherpad plugins
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
# https://github.com/npm/cli/issues/2199
run: >
npm install --no-save --legacy-peer-deps
ep_align
ep_author_hover
ep_cursortrace
ep_embedmedia
ep_font_size
ep_hash_auth
ep_headings2
ep_image_upload
ep_markdown
ep_readonly_guest
ep_set_title_on_pad
ep_spellcheck
ep_subscript_and_superscript
ep_table_of_contents
# Etherpad core dependencies must be installed after installing the
# plugin's dependencies, otherwise npm will try to hoist common
# dependencies by removing them from src/node_modules and installing them
# in the top-level node_modules. As of v6.20.10, npm's hoist logic appears
# to be buggy, because it sometimes removes dependencies from
# src/node_modules but fails to add them to the top-level node_modules.
# Even if npm correctly hoists the dependencies, the hoisting seems to
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
# rules.
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh
-
name: export GIT_HASH to env
id: environment
run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
-
name: Create settings.json
run: cp settings.json.template settings.json
-
name: Disable import/export rate limiting
run: |
sed -e '/^ *"importExportRateLimiting":/,/^ *\}/ s/"max":.*/"max": 1000000/' -i settings.json
# XXX we should probably run all tests, because plugins could effect their results
-
name: Remove standard frontend test files, so only plugin tests are run
run: rm src/tests/frontend/specs/*
-
uses: saucelabs/sauce-connect-action@v2.3.5
with:
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
tunnelIdentifier: ${{ steps.sauce_strings.outputs.tunnel_id }}
-
name: Run the frontend tests
shell: bash
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
SAUCE_NAME: ${{ steps.sauce_strings.outputs.name }}
TRAVIS_JOB_NUMBER: ${{ steps.sauce_strings.outputs.tunnel_id }}
GIT_HASH: ${{ steps.environment.outputs.sha_short }}
run: |
src/tests/frontend/travis/runner.sh

41
.github/workflows/lint-package-lock.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: "Lint"
# any branch is useful for testing before a PR is submitted
on: [push, pull_request]
permissions:
contents: read
jobs:
lint-package-lock:
# run on pushes to any branch
# run on PRs from external forks
if: |
(github.event_name != 'pull_request')
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
name: package-lock.json
runs-on: ubuntu-latest
steps:
-
name: Checkout repository
uses: actions/checkout@v4
-
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install lockfile-lint
run: npm install --no-save lockfile-lint --legacy-peer-deps
-
name: Run lockfile-lint on package-lock.json
run: >
npx lockfile-lint
--path src/package-lock.json
--allowed-hosts npm
--allowed-schemes https:
--allowed-schemes github:
--allowed-urls github:mapbox/node-sqlite3#593c9d498be2510d286349134537e3bf89401c4a

125
.github/workflows/load-test.yml vendored Normal file
View File

@ -0,0 +1,125 @@
name: "Loadtest"
# any branch is useful for testing before a PR is submitted
on: [push, pull_request]
permissions:
contents: read
jobs:
withoutplugins:
# run on pushes to any branch
# run on PRs from external forks
if: |
(github.event_name != 'pull_request')
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
name: without plugins
runs-on: ubuntu-latest
steps:
-
name: Checkout repository
uses: actions/checkout@v4
-
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh
-
name: Install etherpad-load-test
run: sudo npm install -g etherpad-load-test
-
name: Run load test
run: src/tests/frontend/travis/runnerLoadTest.sh 25 50
withplugins:
# run on pushes to any branch
# run on PRs from external forks
if: |
(github.event_name != 'pull_request')
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
name: with Plugins
runs-on: ubuntu-latest
steps:
-
name: Checkout repository
uses: actions/checkout@v4
-
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install etherpad-load-test
run: sudo npm install -g etherpad-load-test
-
name: Install etherpad plugins
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
# https://github.com/npm/cli/issues/2199
run: >
npm install --no-save --legacy-peer-deps
ep_align
ep_author_hover
ep_cursortrace
ep_font_size
ep_hash_auth
ep_headings2
ep_markdown
ep_readonly_guest
ep_set_title_on_pad
ep_spellcheck
ep_subscript_and_superscript
ep_table_of_contents
# Etherpad core dependencies must be installed after installing the
# plugin's dependencies, otherwise npm will try to hoist common
# dependencies by removing them from src/node_modules and installing them
# in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
# to be buggy, because it sometimes removes dependencies from
# src/node_modules but fails to add them to the top-level node_modules.
# Even if npm correctly hoists the dependencies, the hoisting seems to
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
# rules.
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh
-
name: Run load test
run: src/tests/frontend/travis/runnerLoadTest.sh 25 50
long:
# run on pushes to any branch
# run on PRs from external forks
if: |
(github.event_name != 'pull_request')
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
name: long running
runs-on: ubuntu-latest
steps:
-
name: Checkout repository
uses: actions/checkout@v4
-
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh
-
name: Install etherpad-load-test
run: sudo npm install -g etherpad-load-test
-
name: Run load test
run: src/tests/frontend/travis/runnerLoadTest.sh 5000 5

52
.github/workflows/rate-limit.yml vendored Normal file
View File

@ -0,0 +1,52 @@
name: "rate limit"
# any branch is useful for testing before a PR is submitted
on: [push, pull_request]
permissions:
contents: read
jobs:
ratelimit:
# run on pushes to any branch
# run on PRs from external forks
if: |
(github.event_name != 'pull_request')
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
name: test
runs-on: ubuntu-latest
steps:
-
name: Checkout repository
uses: actions/checkout@v4
-
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
-
name: docker network
run: docker network create --subnet=172.23.42.0/16 ep_net
-
name: build docker image
run: |
docker build -f Dockerfile -t epl-debian-slim .
docker build -f src/tests/ratelimit/Dockerfile.nginx -t nginx-latest .
docker build -f src/tests/ratelimit/Dockerfile.anotherip -t anotherip .
-
name: run docker images
run: |
docker run --name etherpad-docker -p 9000:9001 --rm --network ep_net --ip 172.23.42.2 -e 'TRUST_PROXY=true' epl-debian-slim &
docker run -p 8081:80 --rm --network ep_net --ip 172.23.42.1 -d nginx-latest
docker run --rm --network ep_net --ip 172.23.42.3 --name anotherip -dt anotherip
-
name: install dependencies and create symlink for ep_etherpad-lite
run: src/bin/installDeps.sh
-
name: run rate limit test
run: |
cd src/tests/ratelimit
./testlimits.sh

18
.github/workflows/stale.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 6 * * *'
permissions:
issues: write
pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
with:
close-issue-label: wontfix
close-pr-label: wontfix
days-before-close: -1
exempt-issue-labels: 'pinned,security,Bug,Serious Bug,Minor bug,Black hole bug,Special case Bug,Upstream bug,Feature Request'
exempt-pr-labels: 'pinned,security,Bug,Serious Bug,Minor bug,Black hole bug,Special case Bug,Upstream bug,Feature Request'

View File

@ -0,0 +1,99 @@
name: "Upgrade from latest release"
# any branch is useful for testing before a PR is submitted
on: [push, pull_request]
permissions:
contents: read
jobs:
withpluginsLinux:
# run on pushes to any branch
# run on PRs from external forks
if: |
(github.event_name != 'pull_request')
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
name: Linux with Plugins
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [16, 18, 20]
steps:
-
name: Check out latest release
uses: actions/checkout@v4
with:
ref: master
-
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install Etherpad plugins
# The --legacy-peer-deps flag is required to work around a bug in npm
# v7: https://github.com/npm/cli/issues/2199
run: >
npm install --no-save --legacy-peer-deps
ep_align
ep_author_hover
ep_cursortrace
ep_font_size
ep_hash_auth
ep_headings2
ep_image_upload
ep_markdown
ep_readonly_guest
ep_set_title_on_pad
ep_spellcheck
ep_subscript_and_superscript
ep_table_of_contents
# Etherpad core dependencies must be installed after installing the
# plugin's dependencies, otherwise npm will try to hoist common
# dependencies by removing them from src/node_modules and installing them
# in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
# to be buggy, because it sometimes removes dependencies from
# src/node_modules but fails to add them to the top-level node_modules.
# Even if npm correctly hoists the dependencies, the hoisting seems to
# confuse tools such as `npm outdated`, `npm update`, and some ESLint
# rules.
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh
-
name: Run the backend tests
run: cd src && npm test
# Because actions/checkout@v4 is called with "ref: master" and without
# "fetch-depth: 0", the local clone does not have the ${GITHUB_SHA}
# commit. Fetch ${GITHUB_REF} to get the ${GITHUB_SHA} commit. Note that a
# plain "git fetch" only fetches "normal" references (refs/heads/* and
# refs/tags/*), and for pull requests none of the normal references
# include ${GITHUB_SHA}, so we have to explicitly tell Git to fetch
# ${GITHUB_REF}.
-
name: Fetch the new Git commits
run: git fetch --depth=1 origin "${GITHUB_REF}"
-
name: Upgrade to the new Git revision
# For pull requests, ${GITHUB_SHA} is the automatically generated merge
# commit that merges the PR's source branch to its destination branch.
run: git checkout "${GITHUB_SHA}"
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh
-
name: Run the backend tests
run: cd src && npm test
-
name: Install Cypress
run: cd src && npm install cypress --legacy-peer-deps
-
name: Run Etherpad & Test Frontend
run: |
node src/node/server.js &
curl --connect-timeout 10 --max-time 20 --retry 5 --retry-delay 10 --retry-max-time 60 --retry-connrefused http://127.0.0.1:9001/p/test
./src/node_modules/cypress/bin/cypress run --config-file src/tests/frontend/cypress/cypress.config.js

135
.github/workflows/windows.yml vendored Normal file
View File

@ -0,0 +1,135 @@
name: "Windows Build"
# any branch is useful for testing before a PR is submitted
on: [push, pull_request]
permissions:
contents: read
jobs:
build-zip:
# run on pushes to any branch
# run on PRs from external forks
if: |
(github.event_name != 'pull_request')
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
name: Build .zip
runs-on: windows-latest
steps:
-
uses: msys2/setup-msys2@v2
with:
path-type: inherit
install: >-
zip
-
name: Checkout repository
uses: actions/checkout@v4
-
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: |
src/package-lock.json
src/bin/doc/package-lock.json
-
name: Install all dependencies and symlink for ep_etherpad-lite
shell: msys2 {0}
run: src/bin/installDeps.sh
-
name: Run the backend tests
shell: msys2 {0}
run: cd src && npm test
-
name: Build the .zip
shell: msys2 {0}
run: src/bin/buildForWindows.sh
-
name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: etherpad-win.zip
path: etherpad-win.zip
build-exe:
if: |
(github.event_name != 'pull_request')
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
name: Build .exe
needs: build-zip
runs-on: windows-latest
steps:
-
name: Checkout repository
uses: actions/checkout@v4
-
name: Download .zip
uses: actions/download-artifact@v3
with:
name: etherpad-win.zip
path: ..
-
name: Extract .zip
working-directory: ..
run: 7z x etherpad-win.zip -oetherpad-zip
-
name: Create installer
uses: joncloud/makensis-action@v3.7
with:
script-file: 'src/bin/nsis/etherpad.nsi'
-
name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: etherpad-win.exe
path: etherpad-win.exe
deploy-zip:
# run on pushes to any branch
# run on PRs from external forks
permissions:
contents: write
if: |
(github.event_name != 'pull_request')
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
name: Deploy
needs: build-zip
runs-on: windows-latest
steps:
-
name: Download zip
uses: actions/download-artifact@v3
with:
name: etherpad-win.zip
-
name: Extract Etherpad
run: 7z x etherpad-win.zip -oetherpad
-
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: |
etherpad/src/package-lock.json
etherpad/src/bin/doc/package-lock.json
-
name: Install Cypress
run: cd etherpad && cd src && npm install cypress --legacy-peer-deps
-
name: Run Etherpad
run: |
cd etherpad
node node_modules\ep_etherpad-lite\node\server.js &
curl --connect-timeout 10 --max-time 20 --retry 5 --retry-delay 10 --retry-max-time 60 --retry-connrefused http://127.0.0.1:9001/p/test
src\node_modules\cypress\bin\cypress run --config-file src\tests\frontendcypress\cypress.config.js
# On release, upload windows zip to GitHub release tab
-
name: Rename to etherpad-lite-win.zip
shell: powershell
run: mv etherpad-win.zip etherpad-lite-win.zip
- name: upload binaries to release
uses: softprops/action-gh-release@v1
if: ${{startsWith(github.ref, 'refs/tags/v') }}
with:
files: etherpad-lite-win.zip

15
.gitignore vendored
View File

@ -1,24 +1,23 @@
/etherpad-win.exe
/etherpad-win.zip
node_modules
/settings.json
!settings.json.template
APIKEY.txt
SESSIONKEY.txt
bin/abiword.exe
bin/node.exe
etherpad-lite-win.zip
var/dirty.db
bin/convertSettings.json
*~
*.patch
src/static/js/jquery.js
npm-debug.log
*.DS_Store
.ep_initialized
*.crt
*.key
bin/etherpad-1.deb
credentials.json
out/
.nyc_output
./package-lock.json
.idea
/package-lock.json
/src/bin/abiword.exe
/src/bin/convertSettings.json
/src/bin/etherpad-1.deb
/src/bin/node.exe

9
.lgtm.yml Normal file
View File

@ -0,0 +1,9 @@
extraction:
javascript:
index:
exclude:
- src/static/js/vendors
python:
index:
exclude:
- /

View File

@ -8,60 +8,136 @@ services:
cache: false
before_install:
- sudo add-apt-repository -y ppa:libreoffice/ppa
- sudo apt-get update
- sudo apt-get -y install libreoffice
- sudo apt-get -y install libreoffice-pdfimport
install:
- "bin/installDeps.sh"
- "export GIT_HASH=$(git rev-parse --verify --short HEAD)"
- "npm install ep_hash_auth"
script:
- "tests/frontend/travis/runner.sh"
env:
global:
- secure: "WMGxFkOeTTlhWB+ChMucRtIqVmMbwzYdNHuHQjKCcj8HBEPdZLfCuK/kf4rG\nVLcLQiIsyllqzNhBGVHG1nyqWr0/LTm8JRqSCDDVIhpyzp9KpCJQQJG2Uwjk\n6/HIJJh/wbxsEdLNV2crYU/EiVO3A4Bq0YTHUlbhUqG3mSCr5Ec="
- secure: "gejXUAHYscbR6Bodw35XexpToqWkv2ifeECsbeEmjaLkYzXmUUNWJGknKSu7\nEUsSfQV8w+hxApr1Z+jNqk9aX3K1I4btL3cwk2trnNI8XRAvu1c1Iv60eerI\nkE82Rsd5lwUaMEh+/HoL8ztFCZamVndoNgX7HWp5J/NRZZMmh4g="
_set_loglevel_warn: &set_loglevel_warn |
sed -e 's/"loglevel":[^,]*/"loglevel": "WARN"/' \
settings.json.template >settings.json.template.new &&
mv settings.json.template.new settings.json.template
_enable_admin_tests: &enable_admin_tests |
sed -e 's/"enableAdminUITests": false/"enableAdminUITests": true,\n"users":{"admin":{"password":"changeme","is_admin":true}}/' \
settings.json.template >settings.json.template.new &&
mv settings.json.template.new settings.json.template
_install_libreoffice: &install_libreoffice >-
sudo add-apt-repository -y ppa:libreoffice/ppa &&
sudo apt-get update &&
sudo apt-get -y install libreoffice libreoffice-pdfimport
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
# https://github.com/npm/cli/issues/2199
_install_plugins: &install_plugins >-
npm install --no-save --legacy-peer-deps
ep_align
ep_author_hover
ep_cursortrace
ep_font_size
ep_hash_auth
ep_headings2
ep_markdown
ep_readonly_guest
ep_spellcheck
ep_subscript_and_superscript
ep_table_of_contents
ep_set_title_on_pad
jobs:
include:
# we can only frontend tests from the ether/ organization and not from forks.
# To request tests to be run ask a maintainer to fork your repo to ether/
- if: fork = false
name: "Test the Frontend"
name: "Test the Frontend without Plugins"
install:
#FIXME
- "sed 's/\"loglevel\": \"INFO\",/\"loglevel\": \"WARN\",/g' settings.json.template > settings.json"
- "tests/frontend/travis/sauce_tunnel.sh"
- "bin/installDeps.sh"
- *set_loglevel_warn
- *enable_admin_tests
- "src/tests/frontend/travis/sauce_tunnel.sh"
- "src/bin/installDeps.sh"
- "export GIT_HASH=$(git rev-parse --verify --short HEAD)"
script:
- "tests/frontend/travis/runner.sh"
- name: "Run the Backend tests"
- "./src/tests/frontend/travis/runner.sh"
- name: "Run the Backend tests without Plugins"
install:
- "bin/installDeps.sh"
- *install_libreoffice
- *set_loglevel_warn
- "src/bin/installDeps.sh"
- "cd src && npm install && cd -"
script:
- "tests/frontend/travis/runnerBackend.sh"
## Temporarily commented out the Dockerfile tests
# - name: "Test the Dockerfile"
# install:
# - "cd src && npm install && cd -"
# script:
# - "docker build -t etherpad:test ."
# - "docker run -d -p 9001:9001 etherpad:test && sleep 3"
# - "cd src && npm run test-container"
- name: "Load test Etherpad"
- "cd src && npm test"
- name: "Test the Dockerfile"
install:
- "bin/installDeps.sh"
- "cd src && npm install && cd -"
script:
- "docker build -t etherpad:test ."
- "docker run -d -p 9001:9001 etherpad:test && sleep 3"
- "cd src && npm run test-container"
- name: "Load test Etherpad without Plugins"
install:
- *set_loglevel_warn
- "src/bin/installDeps.sh"
- "cd src && npm install && cd -"
- "npm install -g etherpad-load-test"
script:
- "tests/frontend/travis/runnerLoadTest.sh"
- "src/tests/frontend/travis/runnerLoadTest.sh"
# we can only frontend tests from the ether/ organization and not from forks.
# To request tests to be run ask a maintainer to fork your repo to ether/
- if: fork = false
name: "Test the Frontend Plugins only"
install:
- *set_loglevel_warn
- *enable_admin_tests
- "src/tests/frontend/travis/sauce_tunnel.sh"
- "src/bin/installDeps.sh"
- "rm src/tests/frontend/specs/*"
- *install_plugins
- "export GIT_HASH=$(git rev-parse --verify --short HEAD)"
script:
- "./src/tests/frontend/travis/runner.sh"
- name: "Lint test package-lock.json"
install:
- "npm install lockfile-lint"
script:
- npx lockfile-lint --path src/package-lock.json --validate-https --allowed-hosts npm
- name: "Run the Backend tests with Plugins"
install:
- *install_libreoffice
- *set_loglevel_warn
- "src/bin/installDeps.sh"
- *install_plugins
- "cd src && npm install && cd -"
script:
- "cd src && npm test"
- name: "Test the Dockerfile"
install:
- "cd src && npm install && cd -"
script:
- "docker build -t etherpad:test ."
- "docker run -d -p 9001:9001 etherpad:test && sleep 3"
- "cd src && npm run test-container"
- name: "Load test Etherpad with Plugins"
install:
- *set_loglevel_warn
- "src/bin/installDeps.sh"
- *install_plugins
- "cd src && npm install && cd -"
- "npm install -g etherpad-load-test"
script:
- "src/tests/frontend/travis/runnerLoadTest.sh"
- name: "Test rate limit"
install:
- "docker network create --subnet=172.23.42.0/16 ep_net"
- "docker build -f Dockerfile -t epl-debian-slim ."
- "docker build -f src/tests/ratelimit/Dockerfile.nginx -t nginx-latest ."
- "docker build -f src/tests/ratelimit/Dockerfile.anotherip -t anotherip ."
- "docker run -p 8081:80 --rm --network ep_net --ip 172.23.42.1 -d nginx-latest"
- "docker run --name etherpad-docker -p 9000:9001 --rm --network ep_net --ip 172.23.42.2 -e 'TRUST_PROXY=true' epl-debian-slim &"
- "docker run --rm --network ep_net --ip 172.23.42.3 --name anotherip -dt anotherip"
- "./src/bin/installDeps.sh"
script:
- "cd src/tests/ratelimit && bash testlimits.sh"
notifications:
irc:

View File

@ -1,5 +1,679 @@
# Develop -- TODO Change to 1.8.x.
* ...
# 1.9.4
### Compability changes
* Log4js has been updated to the latest version. As it involved a bump of 6 major version.
A lot has changed since then. Most notably the console appender has been deprecated. You can find out more about it [here](https://github.com/log4js-node/log4js-node)
### Notable enhancements and fixes
* Fix for MySQL: The logger calls were incorrectly configured leading to a crash when e.g. somebody uses a different encoding than standard MySQL encoding.
# 1.9.3
### Compability changes
* express-rate-limit has been bumped to 7.0.0: This involves the breaking change that "max: 0"
in the importExportRateLimiting is set to always trigger. So set it to your desired value.
If you haven't changed that value in the settings.json you are all set.
### Notable enhancements and fixes
* Bugfixes
* Fix etherpad crashing with mongodb database
* Enhancements
* Add surrealdb database support. You can find out more about this database [here](https://surrealdb.com).
* Make sqlite faster: The sqlite library has been switched to better-sqlite3. This should lead to better performance.
# 1.9.2
### Notable enhancements and fixes
* Security
* Enable session key rotation: This setting can be enabled in the settings.json. It changes the signing key for the cookie authentication in a fixed interval.
* Bugfixes
* Fix appendRevision when creating a new pad via the API without a text.
* Enhancements
* Bump JQuery to version 3.7
* Update elasticsearch connector to version 8
### Compatibility changes
* No compability changes as JQuery maintains excellent backwards compatibility.
#### For plugin authors
* Please update to JQuery 3.7. There is an excellent deprecation guide over [here](https://api.jquery.com/category/deprecated/). Version 3.1 to 3.7 are relevant for the upgrade.
# 1.9.1
### Notable enhancements and fixes
* Security
* Limit requested revisions in timeslider and export to head revision. (affects v1.9.0)
* Bugfixes
* revisions in `CHANGESET_REQ` (timeslider) and export (txt, html, custom)
are now checked to be numbers.
* bump sql for audit fix
* Enhancements
* Add keybinding meta-backspace to delete to beginning of line
* Fix automatic Windows build via GitHub Actions
* Enable docs to be build cross platform thanks to asciidoctor
### Compatibility changes
* tests: drop windows 7 test coverage & use chrome latest for admin tests
* Require Node 16 for Etherpad and target Node 20 for testing
# 1.9.0
### Notable enhancements and fixes
* Windows build:
* The bundled `node.exe` was upgraded from v12 to v16.
* The bundled `node.exe` is now a 64-bit executable. If you need the 32-bit
version you must download and install Node.js yourself.
* Improvements to login session management:
* `express_sid` cookies and `sessionstorage:*` database records are no longer
created unless `requireAuthentication` is `true` (or a plugin causes them to
be created).
* Login sessions now have a finite lifetime by default (10 days after
leaving).
* `sessionstorage:*` database records are automatically deleted when the login
session expires (with some exceptions that will be fixed in the future).
* Requests for static content (e.g., `/robots.txt`) and special pages (e.g.,
the HTTP API, `/stats`) no longer create login session state.
* The secret used to sign the `express_sid` cookie is now automatically
regenerated every day (called *key rotation*) by default. If key rotation is
enabled, the now-deprecated `SESSIONKEY.txt` file can be safely deleted
after Etherpad starts up (its content is read and saved to the database and
used to validate signatures from old cookies until they expire).
* The following settings from `settings.json` are now applied as expected (they
were unintentionally ignored before):
* `padOptions.lang`
* `padOptions.showChat`
* `padOptions.userColor`
* `padOptions.userName`
* HTTP API:
* Fixed the return value of `getText` when called with a specific revision.
* Fixed a potential attribute pool corruption bug with
`copyPadWithoutHistory`.
* Mappings created by `createGroupIfNotExistsFor` are now removed from the
database when the group is deleted.
* Fixed race conditions in the `setText`, `appendText`, and `restoreRevision`
functions.
* Added an optional `authorId` parameter to `appendText`,
`copyPadWithoutHistory`, `createGroupPad`, `createPad`, `restoreRevision`,
`setHTML`, and `setText`, and bumped the latest API version to 1.3.0.
* Fixed a crash if the database is busy enough to cause a query timeout.
* New `/health` endpoint for getting information about Etherpad's health (see
[draft-inadarei-api-health-check-06](https://www.ietf.org/archive/id/draft-inadarei-api-health-check-06.html)).
* Docker now uses the new `/health` endpoint for health checks, which avoids
issues when authentication is enabled. It also avoids the unnecessary creation
of database records for managing browser sessions.
* When copying a pad, the pad's records are copied in batches to avoid database
timeouts with large pads.
* Exporting a large pad to `.etherpad` format should be faster thanks to bulk
database record fetches.
* When importing an `.etherpad` file, records are now saved to the database in
batches to avoid database timeouts with large pads.
#### For plugin authors
* New `expressPreSession` server-side hook.
* Pad server-side hook changes:
* `padCheck`: New hook.
* `padCopy`: New `srcPad` and `dstPad` context properties.
* `padDefaultContent`: New hook.
* `padRemove`: New `pad` context property.
* The `db` property on Pad objects is now public.
* New `getAuthorId` server-side hook.
* New APIs for processing attributes: `ep_etherpad-lite/static/js/attributes`
(low-level API) and `ep_etherpad-lite/static/js/AttributeMap` (high-level
API).
* The `import` server-side hook has a new `ImportError` context property.
* New `exportEtherpad` and `importEtherpad` server-side hooks.
* The `handleMessageSecurity` and `handleMessage` server-side hooks have a new
`sessionInfo` context property that includes the user's author ID, the pad ID,
and whether the user only has read-only access.
* The `handleMessageSecurity` server-side hook can now be used to grant write
access for the current message only.
* The `init_<pluginName>` server-side hooks have a new `logger` context
property that plugins can use to log messages.
* Prevent infinite loop when exiting the server
* Bump dependencies
### Compatibility changes
* Node.js v14.15.0 or later is now required.
* The default login session expiration (applicable if `requireAuthentication` is
`true`) changed from never to 10 days after the user leaves.
#### For plugin authors
* The `client` context property for the `handleMessageSecurity` and
`handleMessage` server-side hooks is deprecated; use the `socket` context
property instead.
* Pad server-side hook changes:
* `padCopy`:
* The `originalPad` context property is deprecated; use `srcPad` instead.
* The `destinationID` context property is deprecated; use `dstPad.id`
instead.
* `padCreate`: The `author` context property is deprecated; use the new
`authorId` context property instead. Also, the hook now runs asynchronously.
* `padLoad`: Now runs when a temporary Pad object is created during import.
Also, it now runs asynchronously.
* `padRemove`: The `padID` context property is deprecated; use `pad.id`
instead.
* `padUpdate`: The `author` context property is deprecated; use the new
`authorId` context property instead. Also, the hook now runs asynchronously.
* Returning `true` from a `handleMessageSecurity` hook function is deprecated;
return `'permitOnce'` instead.
* Changes to the `src/static/js/Changeset.js` library:
* The following attribute processing functions are deprecated (use the new
attribute APIs instead):
* `attribsAttributeValue()`
* `eachAttribNumber()`
* `makeAttribsString()`
* `opAttributeValue()`
* `opIterator()`: Deprecated in favor of the new `deserializeOps()` generator
function.
* `appendATextToAssembler()`: Deprecated in favor of the new `opsFromAText()`
generator function.
* `newOp()`: Deprecated in favor of the new `Op` class.
* The `AuthorManager.getAuthor4Token()` function is deprecated; use the new
`AuthorManager.getAuthorId()` function instead.
* The exported database records covered by the `exportEtherpadAdditionalContent`
server-side hook now include keys like `${customPrefix}:${padId}:*`, not just
`${customPrefix}:${padId}`.
* Plugin locales should overwrite core's locales Stale
* Plugin locales overwrite core locales
# 1.8.18
Released: 2022-05-05
### Notable enhancements and fixes
* Upgraded ueberDB to fix a regression with CouchDB.
# 1.8.17
Released: 2022-02-23
### Security fixes
* Fixed a vunlerability in the `CHANGESET_REQ` message handler that allowed a
user with any access to read any pad if the pad ID is known.
### Notable enhancements and fixes
* Fixed a bug that caused all pad edit messages received at the server to go
through a single queue. Now there is a separate queue per pad as intended,
which should reduce message processing latency when many pads are active at
the same time.
# 1.8.16
### Security fixes
If you cannot upgrade to v1.8.16 for some reason, you are encouraged to try
cherry-picking the fixes to the version you are running:
```shell
git cherry-pick b7065eb9a0ec..77bcb507b30e
```
* Maliciously crafted `.etherpad` files can no longer overwrite arbitrary
non-pad database records when imported.
* Imported `.etherpad` files are now subject to numerous consistency checks
before any records are written to the database. This should help avoid
denial-of-service attacks via imports of malformed `.etherpad` files.
### Notable enhancements and fixes
* Fixed several `.etherpad` import bugs.
* Improved support for large `.etherpad` imports.
# 1.8.15
### Security fixes
* Fixed leak of the writable pad ID when exporting from the pad's read-only ID.
This only matters if you treat the writeable pad IDs as secret (e.g., you are
not using [ep_padlist2](https://www.npmjs.com/package/ep_padlist2)) and you
share the pad's read-only ID with untrusted users. Instead of treating
writeable pad IDs as secret, you are encouraged to take advantage of
Etherpad's authentication and authorization mechanisms (e.g., use
[ep_openid_connect](https://www.npmjs.com/package/ep_openid_connect) with
[ep_readonly_guest](https://www.npmjs.com/package/ep_readonly_guest), or write
your own
[authentication](https://etherpad.org/doc/v1.8.14/#index_authenticate) and
[authorization](https://etherpad.org/doc/v1.8.14/#index_authorize) plugins).
* Updated dependencies.
### Compatibility changes
* The `logconfig` setting is deprecated.
#### For plugin authors
* Etherpad now uses [jsdom](https://github.com/jsdom/jsdom) instead of
[cheerio](https://cheerio.js.org/) for processing HTML imports. There are two
consequences of this change:
* `require('ep_etherpad-lite/node_modules/cheerio')` no longer works. To fix,
your plugin should directly depend on `cheerio` and do `require('cheerio')`.
* The `collectContentImage` hook's `node` context property is now an
[`HTMLImageElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement)
object rather than a Cheerio Node-like object, so the API is slightly
different. See
[citizenos/ep_image_upload#49](https://github.com/citizenos/ep_image_upload/pull/49)
for an example fix.
* The `clientReady` server-side hook is deprecated; use the new `userJoin` hook
instead.
* The `init_<pluginName>` server-side hooks are now run every time Etherpad
starts up, not just the first time after the named plugin is installed.
* The `userLeave` server-side hook's context properties have changed:
* `auth`: Deprecated.
* `author`: Deprecated; use the new `authorId` property instead.
* `readonly`: Deprecated; use the new `readOnly` property instead.
* `rev`: Deprecated.
* Changes to the `src/static/js/Changeset.js` library:
* `opIterator()`: The unused start index parameter has been removed, as has
the unused `lastIndex()` method on the returned object.
* `smartOpAssembler()`: The returned object's `appendOpWithText()` method is
deprecated without a replacement available to plugins (if you need one, let
us know and we can make the private `opsFromText()` function public).
* Several functions that should have never been public are no longer exported:
`applyZip()`, `assert()`, `clearOp()`, `cloneOp()`, `copyOp()`, `error()`,
`followAttributes()`, `opString()`, `stringOp()`, `textLinesMutator()`,
`toBaseTen()`, `toSplices()`.
### Notable enhancements and fixes
* Accessibility fix for JAWS screen readers.
* Fixed "clear authorship" error (see issue #5128).
* Etherpad now considers square brackets to be valid URL characters.
* The server no longer crashes if an exception is thrown while processing a
message from a client.
* The `useMonospaceFontGlobal` setting now works (thanks @Lastpixl!).
* Chat improvements:
* The message input field is now a text area, allowing multi-line messages
(use shift-enter to insert a newline).
* Whitespace in chat messages is now preserved.
* Docker improvements:
* New `HEALTHCHECK` instruction (thanks @Gared!).
* New `settings.json` variables: `DB_COLLECTION`, `DB_URL`,
`SOCKETIO_MAX_HTTP_BUFFER_SIZE`, `DUMP_ON_UNCLEAN_EXIT` (thanks
@JustAnotherArchivist!).
* `.ep_initialized` files are no longer created.
* Worked around a [Firefox Content Security Policy
bug](https://bugzilla.mozilla.org/show_bug.cgi?id=1721296) that caused CSP
failures when `'self'` was in the CSP header. See issue #4975 for details.
* UeberDB upgraded from v1.4.10 to v1.4.18. For details, see the [ueberDB
changelog](https://github.com/ether/ueberDB/blob/master/CHANGELOG.md).
Highlights:
* The `postgrespool` driver was renamed to `postgres`, replacing the old
driver of that name. If you used the old `postgres` driver, you may see an
increase in the number of database connections.
* For `postgres`, you can now set the `dbSettings` value in `settings.json` to
a connection string (e.g., `"postgres://user:password@host/dbname"`) instead
of an object.
* For `mongodb`, the `dbName` setting was renamed to `database` (but `dbName`
still works for backwards compatibility) and is now optional (if unset, the
database name in `url` is used).
* `/admin/settings` now honors the `--settings` command-line argument.
* Fixed "Author *X* tried to submit changes as author *Y*" detection.
* Error message display improvements.
* Simplified pad reload after importing an `.etherpad` file.
#### For plugin authors
* `clientVars` was added to the context for the `postAceInit` client-side hook.
Plugins should use this instead of the `clientVars` global variable.
* New `userJoin` server-side hook.
* The `userLeave` server-side hook has a new `socket` context property.
* The `helper.aNewPad()` function (accessible to client-side tests) now
accepts hook functions to inject when opening a pad. This can be used to
test any new client-side hooks your plugin provides.
* Chat improvements:
* The `chatNewMessage` client-side hook context has new properties:
* `message`: Provides access to the raw message object so that plugins can
see the original unprocessed message text and any added metadata.
* `rendered`: Allows plugins to completely override how the message is
rendered in the UI.
* New `chatSendMessage` client-side hook that enables plugins to process the
text before sending it to the server or augment the message object with
custom metadata.
* New `chatNewMessage` server-side hook to process new chat messages before
they are saved to the database and relayed to users.
* Readability improvements to browser-side error stack traces.
* Added support for socket.io message acknowledgments.
# 1.8.14
### Security fixes
* Fixed a persistent XSS vulnerability in the Chat component. In case you can't
update to 1.8.14 directly, we strongly recommend to cherry-pick
a7968115581e20ef47a533e030f59f830486bdfa. Thanks to sonarsource for the
professional disclosure.
### Compatibility changes
* Node.js v12.13.0 or later is now required.
* The `favicon` setting is now interpreted as a pathname to a favicon file, not
a URL. Please see the documentation comment in `settings.json.template`.
* The undocumented `faviconPad` and `faviconTimeslider` settings have been
removed.
* MySQL/MariaDB now uses connection pooling, which means you will see up to 10
connections to the MySQL/MariaDB server (by default) instead of 1. This might
cause Etherpad to crash with a "ER_CON_COUNT_ERROR: Too many connections"
error if your server is configured with a low connection limit.
* Changes to environment variable substitution in `settings.json` (see the
documentation comments in `settings.json.template` for details):
* An environment variable set to the string "null" now becomes `null` instead
of the string "null". Similarly, if the environment variable is unset and
the default value is "null" (e.g., `"${UNSET_VAR:null}"`), the value now
becomes `null` instead of the string "null". It is no longer possible to
produce the string "null" via environment variable substitution.
* An environment variable set to the string "undefined" now causes the setting
to be removed instead of set to the string "undefined". Similarly, if the
environment variable is unset and the default value is "undefined" (e.g.,
`"${UNSET_VAR:undefined}"`), the setting is now removed instead of set to
the string "undefined". It is no longer possible to produce the string
"undefined" via environment variable substitution.
* Support for unset variables without a default value is now deprecated.
Please change all instances of `"${FOO}"` in your `settings.json` to
`${FOO:null}` to keep the current behavior.
* The `DB_*` variable substitutions in `settings.json.docker` that previously
defaulted to `null` now default to "undefined".
* Calling `next` without argument when using `Changeset.opIterator` does always
return a new Op. See b9753dcc7156d8471a5aa5b6c9b85af47f630aa8 for details.
### Notable enhancements and fixes
* MySQL/MariaDB now uses connection pooling, which should improve stability and
reduce latency.
* Bulk database writes are now retried individually on write failure.
* Minify: Avoid crash due to unhandled Promise rejection if stat fails.
* padIds are now included in /socket.io query string, e.g.
`https://video.etherpad.com/socket.io/?padId=AWESOME&EIO=3&transport=websocket&t=...&sid=...`.
This is useful for directing pads to separate socket.io nodes.
* <script> elements added via aceInitInnerdocbodyHead hook are now executed.
* Fix read only pad access with authentication.
* Await more db writes.
* Disabled wtfnode dump by default.
* Send `USER_NEWINFO` messages on reconnect.
* Fixed loading in a hidden iframe.
* Fixed a race condition with composition. (Thanks @ingoncalves for an
exceptionally detailed analysis and @rhansen for the fix.)
# 1.8.13
### Notable fixes
* Fixed a bug in the safeRun.sh script (#4935)
* Add more endpoints that do not need authentication/authorization (#4921)
* Fixed issue with non-opening device keyboard on smartphones (#4929)
* Add version string to iframe_editor.css to prevent stale cache entry (#4964)
### Notable enhancements
* Refactor pad loading (no document.write anymore) (#4960)
* Improve import/export functionality, logging and tests (#4957)
* Refactor CSS manager creation (#4963)
* Better metrics
* Add test for client height (#4965)
### Dependencies
* ueberDB2 1.3.2 -> 1.4.4
* express-rate-limit 5.2.5 -> 5.2.6
* etherpad-require-kernel 1.0.9 -> 1.0.11
# 1.8.12
Special mention: Thanks to Sauce Labs for additional testing tunnels to help us
grow! :)
### Security patches
* Fixed a regression in v1.8.11 which caused some pad names to cause Etherpad to
restart.
### Notable fixes
* Fixed a bug in the `dirty` database driver that sometimes caused Node.js to
crash during shutdown and lose buffered database writes.
* Fixed a regression in v1.8.8 that caused "Uncaught TypeError: Cannot read
property '0' of undefined" with some plugins (#4885)
* Less warnings in server console for supported element types on import.
* Support Azure and other network share installations by using a more truthful
relative path.
### Notable enhancements
* Dependency updates
* Various Docker deployment improvements
* Various new translations
* Improvement of rendering of plugin hook list and error message handling
# 1.8.11
### Notable fixes
* Fix server crash issue within PadMessageHandler due to SocketIO handling
* Fix editor issue with drop downs not being visible
* Ensure correct version is passed when loading front end resources
* Ensure underscore and jquery are available in original location for plugin comptability
### Notable enhancements
* Improved page load speeds
# 1.8.10
### Security Patches
* Resolve potential ReDoS vulnerability in your project - GHSL-2020-359
### Compatibility changes
* JSONP API has been removed in favor of using the mature OpenAPI implementation.
* Node 14 is now required for Docker Deployments
### Notable fixes
* Various performance and stability fixes
### Notable enhancements
* Improved line number alignment and user experience around line anchors
* Notification to admin console if a plugin is missing during user file import
* Beautiful loading and reconnecting animation
* Additional code quality improvements
* Dependency updates
# 1.8.9
### Notable fixes
* Fixed HTTP 400 error when importing via the UI.
* Fixed "Error: spawn npm ENOENT" crash on startup in Windows.
### Notable enhancements
* Removed some unnecessary arrow key handling logic.
* Dependency updates.
# 1.8.8
### Security patches
* EJS has been updated to 3.1.6 to mitigate an Arbitrary Code Injection
### Compatibility changes
* Node.js 10.17.0 or newer is now required.
* The `bin/` and `tests/` directories were moved under `src/`. Symlinks were
added at the old locations to hopefully avoid breaking user scripts and other
tools.
* Dependencies are now installed with the `--no-optional` flag to speed
installation. Optional dependencies such as `sqlite3` must now be manually
installed (e.g., `(cd src && npm i sqlite3)`).
* Socket.IO messages are now limited to 10K bytes to make denial of service
attacks more difficult. This may cause issues when pasting large amounts of
text or with plugins that send large messages (e.g., `ep_image_upload`). You
can change the limit via `settings.json`; see `socketIo.maxHttpBufferSize`.
* The top-level `package.json` file, added in v1.8.7, has been removed due to
problematic npm behavior. Whenever you install a plugin you will see the
following benign warnings that can be safely ignored:
```
npm WARN saveError ENOENT: no such file or directory, open '.../package.json'
npm WARN enoent ENOENT: no such file or directory, open '.../package.json'
npm WARN develop No description
npm WARN develop No repository field.
npm WARN develop No README data
npm WARN develop No license field.
```
### Notable enhancements
* You can now generate a link to a specific line number in a pad. Appending
`#L10` to a pad URL will cause your browser to scroll down to line 10.
* Database performance is significantly improved.
* Admin UI now has test coverage in CI. (The tests are not enabled by default;
see `settings.json`.)
* New stats/metrics: `activePads`, `httpStartTime`, `lastDisconnected`,
`memoryUsageHeap`.
* Improved import UX.
* Browser caching improvements.
* Users can now pick absolute white (`#fff`) as their color.
* The `settings.json` template used for Docker images has new variables for
controlling rate limiting.
* Admin UI now has test coverage in CI. (The tests are not enabled by default
because the admin password is required; see `settings.json`.)
* For plugin authors:
* New `callAllSerial()` function that invokes hook functions like `callAll()`
except it supports asynchronous hook functions.
* `callFirst()` and `aCallFirst()` now support the same wide range of hook
function behaviors that `callAll()`, `aCallAll()`, and `callAllSerial()`
support. Also, they now warn when a hook function misbehaves.
* The following server-side hooks now support asynchronous hook functions:
`expressConfigure`, `expressCreateServer`, `padCopy`, `padRemove`
* Backend tests for plugins can now use the
[`ep_etherpad-lite/tests/backend/common`](src/tests/backend/common.js)
module to start the server and simplify API access.
* The `checkPlugins.js` script now automatically adds GitHub CI test coverage
badges for backend tests and npm publish.
### Notable fixes
* Enter key now stays in focus when inserted at bottom of viewport.
* Numbering for ordered list items now properly increments when exported to
text.
* Suppressed benign socket.io connection errors
* Interface no longer loses color variants on disconnect/reconnect event.
* General code quality is further significantly improved.
* Restarting Etherpad via `/admin` actions is more robust.
* Improved reliability of server shutdown and restart.
* No longer error if no buttons are visible.
* For plugin authors:
* Fixed `collectContentLineText` return value handling.
# 1.8.7
### Compatibility-breaking changes
* **IMPORTANT:** It is no longer possible to protect a group pad with a
password. All API calls to `setPassword` or `isPasswordProtected` will fail.
Existing group pads that were previously password protected will no longer be
password protected. If you need fine-grained access control, you can restrict
API session creation in your frontend service, or you can use plugins.
* All workarounds for Microsoft Internet Explorer have been removed. IE might
still work, but it is untested.
* Plugin hook functions are now subject to new sanity checks. Buggy hook
functions will cause an error message to be logged
* Authorization failures now return 403 by default instead of 401
* The `authorize` hook is now only called after successful authentication. Use
the new `preAuthorize` hook if you need to bypass authentication
* The `authFailure` hook is deprecated; use the new `authnFailure` and
`authzFailure` hooks instead
* The `indexCustomInlineScripts` hook was removed
* The `client` context property for the `handleMessage` and
`handleMessageSecurity` hooks has been renamed to `socket` (the old name is
still usable but deprecated)
* The `aceAttribClasses` hook functions are now called synchronously
* The format of `ENTER`, `CREATE`, and `LEAVE` log messages has changed
* Strings passed to `$.gritter.add()` are now expected to be plain text, not
HTML. Use jQuery or DOM objects if you need formatting
### Notable new features
* Users can now import without creating and editing the pad first
* Added a new `readOnly` user setting that makes it possible to create users in
`settings.json` that can read pads but not create or modify them
* Added a new `canCreate` user setting that makes it possible to create users in
`settings.json` that can modify pads but not create them
* The `authorize` hook now accepts `readOnly` to grant read-only access to a pad
* The `authorize` hook now accepts `modify` to grant modify-only (creation
prohibited) access to a pad
* All authentication successes and failures are now logged
* Added a new `cookie.sameSite` setting that makes it possible to enable
authentication when Etherpad is embedded in an iframe from another site
* New `exportHTMLAdditionalContent` hook to include additional HTML content
* New `exportEtherpadAdditionalContent` hook to include additional database
content in `.etherpad` exports
* New `expressCloseServer` hook to close Express when required
* The `padUpdate` hook context now includes `revs` and `changeset`
* `checkPlugin.js` has various improvements to help plugin developers
* The HTTP request object (and therefore the express-session state) is now
accessible from within most `eejsBlock_*` hooks
* Users without a `password` or `hash` property in `settings.json` are no longer
ignored, so they can now be used by authentication plugins
* New permission denied modal and block ``permissionDenied``
* Plugins are now updated to the latest version instead of minor or patches
### Notable fixes
* Fixed rate limit accounting when Etherpad is behind a reverse proxy
* Fixed typos that prevented access to pads via an HTTP API session
* Fixed authorization failures for pad URLs containing a percent-encoded
character
* Fixed exporting of read-only pads
* Passwords are no longer written to connection state database entries or logged
in debug logs
* When using the keyboard to navigate through the toolbar buttons the button
with the focus is now highlighted
* Fixed support for Node.js 10 by passing the `--experimental-worker` flag
* Fixed export of HTML attributes within a line
* Fixed occasional "Cannot read property 'offsetTop' of undefined" error in
timeslider when "follow pad contents" is checked
* socket.io errors are now displayed instead of silently ignored
* Pasting while the caret is in a link now works (except for middle-click paste
on X11 systems)
* Removal of Microsoft Internet Explorer specific code
* Import better handles line breaks and white space
* Fix issue with ``createDiffHTML`` incorrect call of ``getInternalRevisionAText``
* Allow additional characters in URLs
* MySQL engine fix and various other UeberDB updates (See UeberDB changelog).
* Admin UI improvements on search results (to remove duplicate items)
* Removal of unused cruft from ``clientVars`` (``ip`` and ``userAgent``)
### Minor changes
* Temporary disconnections no longer force a full page refresh
* Toolbar layout for narrow screens is improved
* Fixed `SameSite` cookie attribute for the `language`, `token`, and `pref`
cookies
* Fixed superfluous database accesses when deleting a pad
* Expanded test coverage.
* `package-lock.json` is now lint checked on commit
* Various lint fixes/modernization of code
# 1.8.6
* IMPORTANT: This fixes a severe problem with postgresql in 1.8.5
@ -31,7 +705,7 @@
* MINOR: Fix ?showChat URL param issue
* MINOR: Issue where timeslider URI fails to be correct if padID is numeric
* MINOR: Include prompt for clear authorship when entire document is selected
* MINOR: Include full document aText every 100 revisions to make pad restoration on database curruption achievable
* MINOR: Include full document aText every 100 revisions to make pad restoration on database corruption achievable
* MINOR: Several Colibris CSS fixes
* MINOR: Use mime library for mime types instead of hard-coded.
* MINOR: Don't show "new pad button" if instance is read only
@ -281,7 +955,7 @@ finally put them back in their new location, uder `src/static/skins/no-skin`.
# 1.5.3
* NEW: Accessibility support for Screen readers, includes new fonts and keyboard shortcuts
* NEW: API endpoint for Append Chat Message and Chat Backend Tests
* NEW: Error messages displayed on load are included in Default Pad Text (can be supressed)
* NEW: Error messages displayed on load are included in Default Pad Text (can be suppressed)
* NEW: Content Collector can handle key values
* NEW: getAttributesOnPosition Method
* FIX: Firefox keeps attributes (bold etc) on cut/copy -> paste
@ -350,7 +1024,7 @@ finally put them back in their new location, uder `src/static/skins/no-skin`.
* Fix: Timeslider UI Fix
* Fix: Remove Dokuwiki
* Fix: Remove long paths from windows build (stops error during extract)
* Fix: Various globals remvoed
* Fix: Various globals removed
* Fix: Move all scripts into bin/
* Fix: Various CSS bugfixes for Mobile devices
* Fix: Overflow Toolbar
@ -426,7 +1100,7 @@ finally put them back in their new location, uder `src/static/skins/no-skin`.
* FIX: HTML import (don't crash on malformed or blank HTML input; strip title out of html during import)
* FIX: check if uploaded file only contains ascii chars when abiword disabled
* FIX: Plugin search in /admin/plugins
* FIX: Don't create new pad if a non-existant read-only pad is accessed
* FIX: Don't create new pad if a non-existent read-only pad is accessed
* FIX: Drop messages from unknown connections (would lead to a crash after a restart)
* FIX: API: fix createGroupFor endpoint, if mapped group is deleted
* FIX: Import form for other locales
@ -443,7 +1117,7 @@ finally put them back in their new location, uder `src/static/skins/no-skin`.
* NEW: Bump log4js for improved logging
* Fix: Remove URL schemes which don't have RFC standard
* Fix: Fix safeRun subsequent restarts issue
* Fix: Allow safeRun to pass arguements to run.sh
* Fix: Allow safeRun to pass arguments to run.sh
* Fix: Include script for more efficient import
* Fix: Fix sysv comptibile script
* Fix: Fix client side changeset spamming
@ -482,7 +1156,7 @@ finally put them back in their new location, uder `src/static/skins/no-skin`.
* Fix: Support Node 0.10
* Fix: Log HTTP on DEBUG log level
* Fix: Server wont crash on import fails on 0 file import.
* Fix: Import no longer fails consistantly
* Fix: Import no longer fails consistently
* Fix: Language support for non existing languages
* Fix: Mobile support for chat notifications are now usable
* Fix: Re-Enable Editbar buttons on reconnect
@ -514,7 +1188,7 @@ finally put them back in their new location, uder `src/static/skins/no-skin`.
* NEW: Admin dashboard mobile device support and new hooks for Admin dashboard
* NEW: Get current API version from API
* NEW: CLI script to delete pads
* Fix: Automatic client reconnection on disonnect
* Fix: Automatic client reconnection on disconnect
* Fix: Text Export indentation now supports multiple indentations
* Fix: Bugfix getChatHistory API method
* Fix: Stop Chrome losing caret after paste is texted
@ -534,7 +1208,7 @@ finally put them back in their new location, uder `src/static/skins/no-skin`.
* Fix: Stop Opera browser inserting two new lines on enter keypress
* Fix: Stop timeslider from showing NaN on pads with only one revision
* Other: Allow timeslider tests to run and provide & fix various other frontend-tests
* Other: Begin dropping referene to Lite. Etherpad Lite is now named "Etherpad"
* Other: Begin dropping reference to Lite. Etherpad Lite is now named "Etherpad"
* Other: Update to latest jQuery
* Other: Change loading message asking user to please wait on first build
* Other: Allow etherpad to use global npm installation (Safe since node 6.3)

View File

@ -15,9 +15,17 @@
number of the issue that is being fixed, in the form: Fixes #someIssueNumber
```
* if the PR is a **bug fix**:
* the first commit in the series must be a test that shows the failure
* subsequent commits will fix the bug and make the test pass
* the final commit message should include the text `Fixes: #xxx` to link it to its bug report
* The commit that fixes the bug should **include a regression test** that
would fail if the bug fix was reverted. Adding the regression test in the
same commit as the bug fix makes it easier for a reviewer to verify that the
test is appropriate for the bug fix.
* If there is a bug report, **the pull request description should include the
text "`Fixes #xxx`"** so that the bug report is auto-closed when the PR is
merged. It is less useful to say the same thing in a commit message because
GitHub will spam the bug report every time the commit is rebased, and
because a bug number alone becomes meaningless in forks. (A full URL would
be better, but ideally each commit is readable on its own without the need
to examine an external reference to understand motivation or context.)
* think about stability: code has to be backwards compatible as much as possible. Always **assume your code will be run with an older version of the DB/config file**
* if you want to remove a feature, **deprecate it instead**:
* write an issue with your deprecation plan
@ -116,6 +124,7 @@ You can build the docs e.g. produce html, using `make docs`. At some point in th
Front-end tests are found in the `tests/frontend/` folder in the repository. Run them by pointing your browser to `<yourdomainhere>/tests/frontend`.
Back-end tests can be run from the `src` directory, via `npm test`.
You can use `npm test -- --inspect-brk` and navigate to `edge://inspect` or `chrome://inspect` to debug the tests.
## Things you can help with
Etherpad is much more than software. So if you aren't a developer then worry not, there is still a LOT you can do! A big part of what we do is community engagement. You can help in the following ways

View File

@ -4,9 +4,22 @@
#
# Author: muxator
FROM node:10-buster-slim
FROM node:lts-alpine
LABEL maintainer="Etherpad team, https://github.com/ether/etherpad-lite"
ARG TIMEZONE=
RUN \
[ -z "${TIMEZONE}" ] || { \
apk add --no-cache tzdata && \
cp /usr/share/zoneinfo/${TIMEZONE} /etc/localtime && \
echo "${TIMEZONE}" > /etc/timezone; \
}
ENV TIMEZONE=${TIMEZONE}
# Control the configuration file to be copied into the container.
ARG SETTINGS=./settings.json.docker
# plugins to install while building the container. By default no plugins are
# installed.
# If given a value, it has to be a space-separated, quoted list of plugin names.
@ -15,40 +28,92 @@ LABEL maintainer="Etherpad team, https://github.com/ether/etherpad-lite"
# ETHERPAD_PLUGINS="ep_codepad ep_author_neat"
ARG ETHERPAD_PLUGINS=
# Control whether abiword will be installed, enabling exports to DOC/PDF/ODT formats.
# By default, it is not installed.
# If given any value, abiword will be installed.
#
# EXAMPLE:
# INSTALL_ABIWORD=true
ARG INSTALL_ABIWORD=
# Control whether libreoffice will be installed, enabling exports to DOC/PDF/ODT formats.
# By default, it is not installed.
# If given any value, libreoffice will be installed.
#
# EXAMPLE:
# INSTALL_LIBREOFFICE=true
ARG INSTALL_SOFFICE=
# By default, Etherpad container is built and run in "production" mode. This is
# leaner (development dependencies are not installed) and runs faster (among
# other things, assets are minified & compressed).
ENV NODE_ENV=production
ENV ETHERPAD_PRODUCTION=true
# Install dependencies required for modifying access.
RUN apk add shadow bash
# Follow the principle of least privilege: run as unprivileged user.
#
# Running as non-root enables running this image in platforms like OpenShift
# that do not allow images running as root.
RUN useradd --uid 5001 --create-home etherpad
#
# If any of the following args are set to the empty string, default
# values will be chosen.
ARG EP_HOME=
ARG EP_UID=5001
ARG EP_GID=0
ARG EP_SHELL=
RUN mkdir /opt/etherpad-lite && chown etherpad:0 /opt/etherpad-lite
ENV NODE_ENV=production
RUN groupadd --system ${EP_GID:+--gid "${EP_GID}" --non-unique} etherpad && \
useradd --system ${EP_UID:+--uid "${EP_UID}" --non-unique} --gid etherpad \
${EP_HOME:+--home-dir "${EP_HOME}"} --create-home \
${EP_SHELL:+--shell "${EP_SHELL}"} etherpad
ARG EP_DIR=/opt/etherpad-lite
RUN mkdir -p "${EP_DIR}" && chown etherpad:etherpad "${EP_DIR}"
# the mkdir is needed for configuration of openjdk-11-jre-headless, see
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199
RUN \
mkdir -p /usr/share/man/man1 && \
apk update && apk upgrade && \
apk add \
ca-certificates \
git \
${INSTALL_ABIWORD:+abiword abiword-plugin-command} \
${INSTALL_SOFFICE:+libreoffice openjdk8-jre libreoffice-common}
USER etherpad
WORKDIR /opt/etherpad-lite
WORKDIR "${EP_DIR}"
COPY --chown=etherpad:0 ./ ./
COPY --chown=etherpad:etherpad ./ ./
# install node dependencies for Etherpad
RUN bin/installDeps.sh && \
rm -rf ~/.npm/_cacache
# Install the plugins, if ETHERPAD_PLUGINS is not empty.
#
# Bash trick: in the for loop ${ETHERPAD_PLUGINS} is NOT quoted, in order to be
# able to split at spaces.
RUN for PLUGIN_NAME in ${ETHERPAD_PLUGINS}; do npm install "${PLUGIN_NAME}" || exit 1; done
# Plugins must be installed before installing Etherpad's dependencies, otherwise
# npm will try to hoist common dependencies by removing them from
# src/node_modules and installing them in the top-level node_modules. As of
# v6.14.10, npm's hoist logic appears to be buggy, because it sometimes removes
# dependencies from src/node_modules but fails to add them to the top-level
# node_modules. Even if npm correctly hoists the dependencies, the hoisting
# seems to confuse tools such as `npm outdated`, `npm update`, and some ESLint
# rules.
RUN { [ -z "${ETHERPAD_PLUGINS}" ] || \
npm install --no-save --legacy-peer-deps ${ETHERPAD_PLUGINS}; } && \
src/bin/installDeps.sh && \
rm -rf ~/.npm
# Copy the configuration file.
COPY --chown=etherpad:0 ./settings.json.docker /opt/etherpad-lite/settings.json
COPY --chown=etherpad:etherpad ${SETTINGS} "${EP_DIR}"/settings.json
# Fix permissions for root group
# Fix group permissions
RUN chmod -R g=u .
USER root
RUN cd src && npm link
USER etherpad
HEALTHCHECK --interval=20s --timeout=3s CMD ["etherpad-healthcheck"]
EXPOSE 9001
CMD ["node", "node_modules/ep_etherpad-lite/node/server.js"]
CMD ["etherpad"]

View File

@ -1,32 +0,0 @@
doc_sources = $(wildcard doc/*/*.md) $(wildcard doc/*.md)
outdoc_files = $(addprefix out/,$(doc_sources:.md=.html))
docassets = $(addprefix out/,$(wildcard doc/assets/*))
VERSION = $(shell node -e "console.log( require('./src/package.json').version )")
UNAME := $(shell uname -s)
ensure_marked_is_installed:
set -eu; \
hash npm; \
if [ $(shell npm list --prefix bin/doc >/dev/null 2>/dev/null; echo $$?) -ne "0" ]; then \
npm ci --prefix=bin/doc; \
fi
docs: ensure_marked_is_installed $(outdoc_files) $(docassets)
out/doc/assets/%: doc/assets/%
mkdir -p $(@D)
cp $< $@
out/doc/%.html: doc/%.md
mkdir -p $(@D)
node bin/doc/generate.js --format=html --template=doc/template.html $< > $@
ifeq ($(UNAME),Darwin)
sed -i '' 's/__VERSION__/${VERSION}/' $@
else
sed -i 's/__VERSION__/${VERSION}/' $@
endif
clean:
rm -rf out/

321
README.md
View File

@ -1,153 +1,296 @@
# A real-time collaborative editor for the web
<a href="https://hub.docker.com/r/etherpad/etherpad"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/etherpad/etherpad"></a>
[![Travis (.org)](https://api.travis-ci.org/ether/etherpad-lite.svg?branch=develop)](https://travis-ci.org/github/ether/etherpad-lite)
# Etherpad: A real-time collaborative editor for the web
![Demo Etherpad Animated Jif](doc/images/etherpad_demo.gif "Etherpad in action")
# About
Etherpad is a real-time collaborative editor scalable to thousands of simultaneous real time users. It provides full data export capabilities, and runs on _your_ server, under _your_ control.
## About
**[Try it out](https://video.etherpad.com)**
Etherpad is a real-time collaborative editor [scalable to thousands of
simultaneous real time users](http://scale.etherpad.org/). It provides [full
data
export](https://github.com/ether/etherpad-lite/wiki/Understanding-Etherpad's-Full-Data-Export-capabilities)
capabilities, and runs on _your_ server, under _your_ control.
# Installation
## Try it out
## Requirements
- `nodejs` >= **10.13.0**.
Wikimedia provide a [public Etherpad instance for you to Try Etherpad out.](https://etherpad.wikimedia.org) or [use another public Etherpad instance to see other features](https://github.com/ether/etherpad-lite/wiki/Sites-That-Run-Etherpad#sites-that-run-etherpad)
## GNU/Linux and other UNIX-like systems
## Project Status
### Quick install on Debian/Ubuntu
```
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
We're looking for maintainers and have some funding available. Please contact John McLear if you can help.
### Code Quality
[![Code Quality](https://github.com/ether/etherpad-lite/actions/workflows/codeql-analysis.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/codeql-analysis.yml)
[![package.lock](https://github.com/ether/etherpad-lite/actions/workflows/lint-package-lock.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/lint-package-lock.yml)
### Testing
[![Backend tests](https://github.com/ether/etherpad-lite/actions/workflows/backend-tests.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/backend-tests.yml)
[![Simulated Load](https://github.com/ether/etherpad-lite/actions/workflows/load-test.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/load-test.yml)
[![Rate Limit](https://github.com/ether/etherpad-lite/actions/workflows/rate-limit.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/rate-limit.yml)
[![Docker file](https://github.com/ether/etherpad-lite/actions/workflows/dockerfile.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/dockerfile.yml)
[![Frontend admin tests powered by Sauce Labs](https://github.com/ether/etherpad-lite/actions/workflows/frontend-admin-tests.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/frontend-admin-tests.yml)
[![Frontend tests powered by Sauce Labs](https://github.com/ether/etherpad-lite/actions/workflows/frontend-tests.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/frontend-tests.yml)
[![Sauce Test Status](https://saucelabs.com/buildstatus/etherpad.svg)](https://saucelabs.com/u/etherpad)
[![Windows Build](https://github.com/ether/etherpad-lite/actions/workflows/windows.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/windows.yml)
### Engagement
[![Docker Pulls](https://img.shields.io/docker/pulls/etherpad/etherpad?color=%2344b492)](https://hub.docker.com/r/etherpad/etherpad)
[![Discord](https://img.shields.io/discord/741309013593030667?color=%2344b492)](https://discord.com/invite/daEjfhw)
[![Etherpad plugins](https://img.shields.io/endpoint?url=https%3A%2F%2Fstatic.etherpad.org%2Fshields.json&color=%2344b492 "Etherpad plugins")](https://static.etherpad.org/index.html)
![Languages](https://img.shields.io/static/v1?label=Languages&message=105&color=%2344b492)
![Translation Coverage](https://img.shields.io/static/v1?label=Languages&message=98%&color=%2344b492)
## Installation
### Requirements
[Node.js](https://nodejs.org/) >= **16.20.1**.
### GNU/Linux and other UNIX-like systems
#### Quick install on Debian/Ubuntu
```sh
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt install -y nodejs
git clone --branch master https://github.com/ether/etherpad-lite.git && cd etherpad-lite && bin/run.sh
git clone --branch master https://github.com/ether/etherpad-lite.git &&
cd etherpad-lite &&
src/bin/run.sh
```
### Manual install
You'll need git and [node.js](https://nodejs.org) installed (minimum required Node version: **10.13.0**).
#### Manual install
You'll need Git and [Node.js](https://nodejs.org/) installed.
**As any user (we recommend creating a separate user called etherpad):**
1. Move to a folder where you want to install Etherpad. Clone the git repository: `git clone --branch master git://github.com/ether/etherpad-lite.git`
2. Change into the new directory containing the cloned source code: `cd etherpad-lite`
3. run `bin/run.sh` and open <http://127.0.0.1:9001> in your browser.
1. Move to a folder where you want to install Etherpad.
2. Clone the Git repository: `git clone --branch master
https://github.com/ether/etherpad-lite.git`
3. Change into the new directory containing the cloned source code: `cd
etherpad-lite`
4. Run `src/bin/run.sh` and open http://127.0.0.1:9001 in your browser.
To update to the latest released version, execute `git pull origin`. The next start with `bin/run.sh` will update the dependencies.
To update to the latest released version, execute `git pull origin`. The next
start with `src/bin/run.sh` will update the dependencies.
[Next steps](#next-steps).
### Windows
## Windows
#### Prebuilt Windows package
### Prebuilt Windows package
This package runs on any Windows machine, but for development purposes, please do a manual install.
This package runs on any Windows machine. You can perform a manual installation
via git for development purposes, but as this uses symlinks which performs
unreliably on Windows, please stick to the prebuilt package if possible.
1. [Download the latest Windows package](https://etherpad.org/#download)
2. Extract the folder
1. [Download the latest Windows package](https://etherpad.org/#download)
2. Extract the folder
Run `start.bat` and open <http://localhost:9001> in your browser. You like it? [Next steps](#next-steps).
Run `start.bat` and open <http://localhost:9001> in your browser.
### Manually install on Windows
You'll need [node.js](https://nodejs.org) and (optionally, though recommended) git.
#### Manually install on Windows
1. Grab the source, either
- download <https://github.com/ether/etherpad-lite/zipball/master>
- or `git clone --branch master https://github.com/ether/etherpad-lite.git`
2. With a "Run as administrator" command prompt execute `bin\installOnWindows.bat`
You'll need [Node.js](https://nodejs.org) and (optionally, though recommended)
git.
Now, run `start.bat` and open <http://localhost:9001> in your browser.
1. Grab the source, either:
* download <https://github.com/ether/etherpad-lite/zipball/master>
* or `git clone --branch master
https://github.com/ether/etherpad-lite.git`
2. With a "Run as administrator" command prompt execute
`src\bin\installOnWindows.bat`
Update to the latest version with `git pull origin`, then run `bin\installOnWindows.bat`, again.
Now, run `start.bat` and open http://localhost:9001 in your browser.
If cloning to a subdirectory within another project, you may need to do the following:
Update to the latest version with `git pull origin`, then run
`src\bin\installOnWindows.bat`, again.
1. Start the server manually (e.g. `node/node_modules/ep_etherpad-lite/node/server.js`)
2. Edit the db `filename` in `settings.json` to the relative directory with the file (e.g. `application/lib/etherpad-lite/var/dirty.db`)
3. Add auto-generated files to the main project `.gitignore`
If cloning to a subdirectory within another project, you may need to do the
following:
## Docker container
1. Start the server manually (e.g. `node src/node/server.js`)
2. Edit the db `filename` in `settings.json` to the relative directory with
the file (e.g. `application/lib/etherpad-lite/var/dirty.db`)
3. Add auto-generated files to the main project `.gitignore`
Find [here](doc/docker.md) information on running Etherpad in a container.
### Docker container
# Next Steps
Find [here](doc/docker.adoc) information on running Etherpad in a container.
## Tweak the settings
You can modify the settings in `settings.json`.
If you need to handle multiple settings files, you can pass the path to a settings file to `bin/run.sh` using the `-s|--settings` option: this allows you to run multiple Etherpad instances from the same installation.
Similarly, `--credentials` can be used to give a settings override file, `--apikey` to give a different APIKEY.txt file and `--sessionkey` to give a non-default SESSIONKEY.txt.
**Each configuration parameter can also be set via an environment variable**, using the syntax `"${ENV_VAR}"` or `"${ENV_VAR:default_value}"`. For details, refer to `settings.json.template`.
Once you have access to your `/admin` section settings can be modified through the web browser.
## Plugins
If you are planning to use Etherpad in a production environment, you should use a dedicated database such as `mysql`, since the `dirtyDB` database driver is only for testing and/or development purposes.
## Secure your installation
If you have enabled authentication in `users` section in `settings.json`, it is a good security practice to **store hashes instead of plain text passwords** in that file. This is _especially_ advised if you are running a production installation.
Please install [ep_hash_auth plugin](https://www.npmjs.com/package/ep_hash_auth) and configure it.
If you prefer, `ep_hash_auth` also gives you the option of storing the users in a custom directory in the file system, without having to edit `settings.json` and restart Etherpad each time.
## Customize functionalities with plugins
Etherpad is very customizable through plugins.
![Basic install](doc/images/etherpad_basic.png "Basic Installation")
![Full Features](doc/images/etherpad_full_features.png "You can add a lot of plugins !")
Etherpad is very customizable through plugins. Instructions for installing themes and plugins can be found in [the plugin wiki article](https://github.com/ether/etherpad-lite/wiki/Available-Plugins).
### Available Plugins
## Getting the full features
Run the following command in your Etherpad folder to get all of the features visible in the demo gif:
For a list of available plugins, see the [plugins
site](https://static.etherpad.org).
```
npm install ep_headings2 ep_markdown ep_comments_page ep_align ep_page_view ep_font_color ep_webrtc ep_embedded_hyperlinks2
### Plugin Installation
You can install plugins from the admin web interface (e.g.,
http://127.0.0.1:9001/admin/plugins).
Alternatively, you can install plugins from the command line:
```sh
cd /path/to/etherpad-lite
# The `--no-save` and `--legacy-peer-deps` arguments are necessary to work
# around npm quirks.
npm install --no-save --legacy-peer-deps ep_${plugin_name}
```
## Customize the style with skin variants
Also see [the plugin wiki
article](https://github.com/ether/etherpad-lite/wiki/Available-Plugins).
Open <http://127.0.0.1:9001/p/test#skinvariantsbuilder> in your browser and start playing !
### Suggested Plugins
Run the following command in your Etherpad folder to get all of the features
visible in the above demo gif:
```sh
npm install --no-save --legacy-peer-deps \
ep_align \
ep_comments_page \
ep_embedded_hyperlinks2 \
ep_font_color \
ep_headings2 \
ep_markdown \
ep_webrtc
```
For user authentication, you are encouraged to run an [OpenID
Connect](https://openid.net/connect/) identity provider (OP) and install the
following plugins:
* [ep_openid_connect](https://github.com/ether/ep_openid_connect#readme) to
authenticate against your OP.
* [ep_guest](https://github.com/ether/ep_guest#readme) to create a
"guest" account that has limited access (e.g., read-only access).
* [ep_user_displayname](https://github.com/ether/ep_user_displayname#readme)
to automatically populate each user's displayed name from your OP.
* [ep_stable_authorid](https://github.com/ether/ep_stable_authorid#readme) so
that each user's chosen color, display name, comment ownership, etc. is
strongly linked to their account.
## Next Steps
### Tweak the settings
You can modify the settings in `settings.json`. If you need to handle multiple
settings files, you can pass the path to a settings file to `src/bin/run.sh`
using the `-s|--settings` option: this allows you to run multiple Etherpad
instances from the same installation. Similarly, `--credentials` can be used to
give a settings override file, `--apikey` to give a different APIKEY.txt file
and `--sessionkey` to give a non-default `SESSIONKEY.txt`. **Each configuration
parameter can also be set via an environment variable**, using the syntax
`"${ENV_VAR}"` or `"${ENV_VAR:default_value}"`. For details, refer to
`settings.json.template`. Once you have access to your `/admin` section,
settings can be modified through the web browser.
If you are planning to use Etherpad in a production environment, you should use
a dedicated database such as `mysql`, since the `dirtyDB` database driver is
only for testing and/or development purposes.
### Secure your installation
If you have enabled authentication in `users` section in `settings.json`, it is
a good security practice to **store hashes instead of plain text passwords** in
that file. This is _especially_ advised if you are running a production
installation.
Please install [ep_hash_auth plugin](https://www.npmjs.com/package/ep_hash_auth)
and configure it. If you prefer, `ep_hash_auth` also gives you the option of
storing the users in a custom directory in the file system, without having to
edit `settings.json` and restart Etherpad each time.
### Customize the style with skin variants
Open http://127.0.0.1:9001/p/test#skinvariantsbuilder in your browser and start
playing!
![Skin Variant](doc/images/etherpad_skin_variants.gif "Skin variants")
## Helpful resources
The [wiki](https://github.com/ether/etherpad-lite/wiki) is your one-stop resource for Tutorials and How-to's.
The [wiki](https://github.com/ether/etherpad-lite/wiki) is your one-stop
resource for Tutorials and How-to's.
Documentation can be found in `doc/`.
# Development
## Development
## Things you should know
You can debug Etherpad using `bin/debugRun.sh`.
### Things you should know
You can run Etherpad quickly launching `bin/fastRun.sh`. It's convenient for developers and advanced users. Be aware that it will skip the dependencies update, so remember to run `bin/installDeps.sh` after installing a new dependency or upgrading version.
You can debug Etherpad using `src/bin/debugRun.sh`.
If you want to find out how Etherpad's `Easysync` works (the library that makes it really realtime), start with this [PDF](https://github.com/ether/etherpad-lite/raw/master/doc/easysync/easysync-full-description.pdf) (complex, but worth reading).
You can run Etherpad quickly launching `src/bin/fastRun.sh`. It's convenient for
developers and advanced users. Be aware that it will skip the dependencies
update, so remember to run `src/bin/installDeps.sh` after installing a new
dependency or upgrading version.
## Contributing
Read our [**Developer Guidelines**](https://github.com/ether/etherpad-lite/blob/master/CONTRIBUTING.md)
If you want to find out how Etherpad's `Easysync` works (the library that makes
it really realtime), start with this
[PDF](https://github.com/ether/etherpad-lite/raw/master/doc/easysync/easysync-full-description.pdf)
(complex, but worth reading).
# Get in touch
The official channel for contacting the development team is via the [Github issues](https://github.com/ether/etherpad-lite/issues).
### Contributing
For **responsible disclosure of vulnerabilities**, please write a mail to the maintainer (a.mux@inwind.it).
Read our [**Developer
Guidelines**](https://github.com/ether/etherpad-lite/blob/master/CONTRIBUTING.md)
# HTTP API
Etherpad is designed to be easily embeddable and provides a [HTTP API](https://github.com/ether/etherpad-lite/wiki/HTTP-API)
that allows your web application to manage pads, users and groups. It is recommended to use the [available client implementations](https://github.com/ether/etherpad-lite/wiki/HTTP-API-client-libraries) in order to interact with this API.
### HTTP API
OpenAPI (previously swagger) definitions for the API are exposed under `/api/openapi.json`.
Etherpad is designed to be easily embeddable and provides a [HTTP
API](https://github.com/ether/etherpad-lite/wiki/HTTP-API) that allows your web
application to manage pads, users and groups. It is recommended to use the
[available client
implementations](https://github.com/ether/etherpad-lite/wiki/HTTP-API-client-libraries)
in order to interact with this API.
# jQuery plugin
There is a [jQuery plugin](https://github.com/ether/etherpad-lite-jquery-plugin) that helps you to embed Pads into your website.
OpenAPI (previously swagger) definitions for the API are exposed under
`/api/openapi.json`.
# Plugin Framework
Etherpad offers a plugin framework, allowing you to easily add your own features. By default your Etherpad is extremely light-weight and it's up to you to customize your experience. Once you have Etherpad installed you should [visit the plugin page](https://static.etherpad.org/) and take control.
### jQuery plugin
# Translations / Localizations (i18n / l10n)
Etherpad comes with translations into all languages thanks to the team at [TranslateWiki](https://translatewiki.net/).
There is a [jQuery plugin](https://github.com/ether/etherpad-lite-jquery-plugin)
that helps you to embed Pads into your website.
If you require translations in [plugins](https://static.etherpad.org/) please send pull request to each plugin individually.
### Plugin Framework
Etherpad offers a plugin framework, allowing you to easily add your own
features. By default your Etherpad is extremely light-weight and it's up to you
to customize your experience. Once you have Etherpad installed you should [visit
the plugin page](https://static.etherpad.org/) and take control.
### Translations / Localizations (i18n / l10n)
Etherpad comes with translations into all languages thanks to the team at
[TranslateWiki](https://translatewiki.net/).
If you require translations in [plugins](https://static.etherpad.org/) please
send pull request to each plugin individually.
## FAQ
# FAQ
Visit the **[FAQ](https://github.com/ether/etherpad-lite/wiki/FAQ)**.
# License
## Get in touch
The official channel for contacting the development team is via the [GitHub
issues](https://github.com/ether/etherpad-lite/issues).
For **responsible disclosure of vulnerabilities**, please write a mail to the
maintainers (a.mux@inwind.it and contact@etherpad.org).
Join the official [Etherpad Discord
Channel](https://discord.com/invite/daEjfhw).
## License
[Apache License v2](http://www.apache.org/licenses/LICENSE-2.0.html)

1
bin Symbolic link
View File

@ -0,0 +1 @@
src/bin

View File

@ -1,63 +0,0 @@
#!/bin/sh
pecho() { printf %s\\n "$*"; }
log() { pecho "$@"; }
error() { log "ERROR: $@" >&2; }
fatal() { error "$@"; exit 1; }
is_cmd() { command -v "$@" >/dev/null 2>&1; }
# Move to the folder where ep-lite is installed
cd "$(dirname "$0")"/..
# Is wget installed?
is_cmd wget || fatal "Please install wget"
# Is zip installed?
is_cmd zip || fatal "Please install zip"
# Is zip installed?
is_cmd unzip || fatal "Please install unzip"
START_FOLDER=$(pwd);
TMP_FOLDER=$(mktemp -d)
log "create a clean environment in $TMP_FOLDER..."
cp -ar . "$TMP_FOLDER"
cd "$TMP_FOLDER"
rm -rf node_modules
rm -f etherpad-lite-win.zip
# setting NODE_ENV=production ensures that dev dependencies are not installed,
# making the windows package smaller
export NODE_ENV=production
log "do a normal unix install first..."
bin/installDeps.sh || exit 1
log "copy the windows settings template..."
cp settings.json.template settings.json
log "resolve symbolic links..."
cp -rL node_modules node_modules_resolved
rm -rf node_modules
mv node_modules_resolved node_modules
log "download windows node..."
cd bin
wget "https://nodejs.org/dist/latest-erbium/win-x86/node.exe" -O ../node.exe
log "remove git history to reduce folder size"
rm -rf .git/objects
log "remove windows jsdom-nocontextify/test folder"
rm -rf "$TMP_FOLDER"/src/node_modules/wd/node_modules/request/node_modules/form-data/node_modules/combined-stream/test
rm -rf "$TMP_FOLDER"/src/node_modules/nodemailer/node_modules/mailcomposer/node_modules/mimelib/node_modules/encoding/node_modules/iconv-lite/encodings/tables
log "create the zip..."
cd "$TMP_FOLDER"
zip -9 -r "$START_FOLDER"/etherpad-lite-win.zip ./*
log "clean up..."
rm -rf "$TMP_FOLDER"
log "Finished. You can find the zip in the Etherpad root folder, it's called etherpad-lite-win.zip"

View File

@ -1,94 +0,0 @@
/*
* This is a debug tool. It checks all revisions for data corruption
*/
if (process.argv.length != 2) {
console.error("Use: node bin/checkAllPads.js");
process.exit(1);
}
// load and initialize NPM
let npm = require('../src/node_modules/npm');
npm.load({}, async function() {
try {
// initialize the database
let settings = require('../src/node/utils/Settings');
let db = require('../src/node/db/DB');
await db.init();
// load modules
let Changeset = require('../src/static/js/Changeset');
let padManager = require('../src/node/db/PadManager');
// get all pads
let res = await padManager.listAllPads();
for (let padId of res.padIDs) {
let pad = await padManager.getPad(padId);
// check if the pad has a pool
if (pad.pool === undefined) {
console.error("[" + pad.id + "] Missing attribute pool");
continue;
}
// create an array with key kevisions
// key revisions always save the full pad atext
let head = pad.getHeadRevisionNumber();
let keyRevisions = [];
for (let rev = 0; rev < head; rev += 100) {
keyRevisions.push(rev);
}
// run through all key revisions
for (let keyRev of keyRevisions) {
// create an array of revisions we need till the next keyRevision or the End
var revisionsNeeded = [];
for (let rev = keyRev ; rev <= keyRev + 100 && rev <= head; rev++) {
revisionsNeeded.push(rev);
}
// this array will hold all revision changesets
var revisions = [];
// run through all needed revisions and get them from the database
for (let revNum of revisionsNeeded) {
let revision = await db.get("pad:" + pad.id + ":revs:" + revNum);
revisions[revNum] = revision;
}
// check if the revision exists
if (revisions[keyRev] == null) {
console.error("[" + pad.id + "] Missing revision " + keyRev);
continue;
}
// check if there is a atext in the keyRevisions
if (revisions[keyRev].meta === undefined || revisions[keyRev].meta.atext === undefined) {
console.error("[" + pad.id + "] Missing atext in revision " + keyRev);
continue;
}
let apool = pad.pool;
let atext = revisions[keyRev].meta.atext;
for (let rev = keyRev + 1; rev <= keyRev + 100 && rev <= head; rev++) {
try {
let cs = revisions[rev].changeset;
atext = Changeset.applyToAText(cs, atext, apool);
} catch (e) {
console.error("[" + pad.id + "] Bad changeset at revision " + i + " - " + e.message);
}
}
}
console.log("finished");
process.exit(0);
}
} catch (err) {
console.trace(err);
process.exit(1);
}
});

View File

@ -1,95 +0,0 @@
/*
* This is a debug tool. It checks all revisions for data corruption
*/
if (process.argv.length != 3) {
console.error("Use: node bin/checkPad.js $PADID");
process.exit(1);
}
// get the padID
const padId = process.argv[2];
// load and initialize NPM;
let npm = require('../src/node_modules/npm');
npm.load({}, async function() {
try {
// initialize database
let settings = require('../src/node/utils/Settings');
let db = require('../src/node/db/DB');
await db.init();
// load modules
let Changeset = require('ep_etherpad-lite/static/js/Changeset');
let padManager = require('../src/node/db/PadManager');
let exists = await padManager.doesPadExists(padId);
if (!exists) {
console.error("Pad does not exist");
process.exit(1);
}
// get the pad
let pad = await padManager.getPad(padId);
// create an array with key revisions
// key revisions always save the full pad atext
let head = pad.getHeadRevisionNumber();
let keyRevisions = [];
for (let rev = 0; rev < head; rev += 100) {
keyRevisions.push(rev);
}
// run through all key revisions
for (let keyRev of keyRevisions) {
// create an array of revisions we need till the next keyRevision or the End
let revisionsNeeded = [];
for (let rev = keyRev; rev <= keyRev + 100 && rev <= head; rev++) {
revisionsNeeded.push(rev);
}
// this array will hold all revision changesets
var revisions = [];
// run through all needed revisions and get them from the database
for (let revNum of revisionsNeeded) {
let revision = await db.get("pad:" + padId + ":revs:" + revNum);
revisions[revNum] = revision;
}
// check if the pad has a pool
if (pad.pool === undefined ) {
console.error("Attribute pool is missing");
process.exit(1);
}
// check if there is an atext in the keyRevisions
if (revisions[keyRev] === undefined || revisions[keyRev].meta === undefined || revisions[keyRev].meta.atext === undefined) {
console.error("No atext in key revision " + keyRev);
continue;
}
let apool = pad.pool;
let atext = revisions[keyRev].meta.atext;
for (let rev = keyRev + 1; rev <= keyRev + 100 && rev <= head; rev++) {
try {
// console.log("check revision " + rev);
let cs = revisions[rev].changeset;
atext = Changeset.applyToAText(cs, atext, apool);
} catch(e) {
console.error("Bad changeset at revision " + rev + " - " + e.message);
continue;
}
}
console.log("finished");
process.exit(0);
}
} catch (e) {
console.trace(e);
process.exit(1);
}
});

View File

@ -1,120 +0,0 @@
/*
* This is a debug tool. It checks all revisions for data corruption
*/
if (process.argv.length != 3) {
console.error("Use: node bin/checkPadDeltas.js $PADID");
process.exit(1);
}
// get the padID
const padId = process.argv[2];
// load and initialize NPM;
var expect = require('expect.js')
var diff = require('diff')
var async = require('async')
let npm = require('../src/node_modules/npm');
var async = require("ep_etherpad-lite/node_modules/async");
var Changeset = require("ep_etherpad-lite/static/js/Changeset");
npm.load({}, async function() {
try {
// initialize database
let settings = require('../src/node/utils/Settings');
let db = require('../src/node/db/DB');
await db.init();
// load modules
let Changeset = require('ep_etherpad-lite/static/js/Changeset');
let padManager = require('../src/node/db/PadManager');
let exists = await padManager.doesPadExists(padId);
if (!exists) {
console.error("Pad does not exist");
process.exit(1);
}
// get the pad
let pad = await padManager.getPad(padId);
//create an array with key revisions
//key revisions always save the full pad atext
var head = pad.getHeadRevisionNumber();
var keyRevisions = [];
for(var i=0;i<head;i+=100)
{
keyRevisions.push(i);
}
//create an array with all revisions
var revisions = [];
for(var i=0;i<=head;i++)
{
revisions.push(i);
}
var atext = Changeset.makeAText("\n")
//run trough all revisions
async.forEachSeries(revisions, function(revNum, callback)
{
//console.log('Fetching', revNum)
db.db.get("pad:"+padId+":revs:" + revNum, function(err, revision)
{
if(err) return callback(err);
//check if there is a atext in the keyRevisions
if(~keyRevisions.indexOf(revNum) && (revision === undefined || revision.meta === undefined || revision.meta.atext === undefined)) {
console.error("No atext in key revision " + revNum);
callback();
return;
}
try {
//console.log("check revision ", revNum);
var cs = revision.changeset;
atext = Changeset.applyToAText(cs, atext, pad.pool);
}
catch(e) {
console.error("Bad changeset at revision " + revNum + " - " + e.message);
callback();
return;
}
if(~keyRevisions.indexOf(revNum)) {
try {
expect(revision.meta.atext.text).to.eql(atext.text)
expect(revision.meta.atext.attribs).to.eql(atext.attribs)
}catch(e) {
console.error("Atext in key revision "+revNum+" doesn't match computed one.")
console.log(diff.diffChars(atext.text, revision.meta.atext.text).map(function(op) {if(!op.added && !op.removed) op.value = op.value.length; return op}))
//console.error(e)
//console.log('KeyRev. :', revision.meta.atext)
//console.log('Computed:', atext)
callback()
return
}
}
setImmediate(callback)
});
}, function(er) {
if(pad.atext.text == atext.text) console.log('ok')
else {
console.error('Pad AText doesn\'t match computed one! (Computed ',atext.text.length, ', db', pad.atext.text.length,')')
console.log(diff.diffChars(atext.text, pad.atext.text).map(function(op) {if(!op.added && !op.removed) op.value = op.value.length; return op}))
}
callback(er)
});
process.exit(0);
} catch (e) {
console.trace(e);
process.exit(1);
}
});

View File

@ -1,453 +0,0 @@
var startTime = Date.now();
var fs = require("fs");
var ueberDB = require("../src/node_modules/ueberdb2");
var mysql = require("../src/node_modules/ueberdb2/node_modules/mysql");
var async = require("../src/node_modules/async");
var Changeset = require("ep_etherpad-lite/static/js/Changeset");
var randomString = require('ep_etherpad-lite/static/js/pad_utils').randomString;
var AttributePool = require("ep_etherpad-lite/static/js/AttributePool");
var settingsFile = process.argv[2];
var sqlOutputFile = process.argv[3];
//stop if the settings file is not set
if(!settingsFile || !sqlOutputFile)
{
console.error("Use: node convert.js $SETTINGSFILE $SQLOUTPUT");
process.exit(1);
}
log("read settings file...");
//read the settings file and parse the json
var settings = JSON.parse(fs.readFileSync(settingsFile, "utf8"));
log("done");
log("open output file...");
var sqlOutput = fs.openSync(sqlOutputFile, "w");
var sql = "SET CHARACTER SET UTF8;\n" +
"CREATE TABLE IF NOT EXISTS `store` ( \n" +
"`key` VARCHAR( 100 ) NOT NULL , \n" +
"`value` LONGTEXT NOT NULL , \n" +
"PRIMARY KEY ( `key` ) \n" +
") ENGINE = INNODB;\n" +
"START TRANSACTION;\n\n";
fs.writeSync(sqlOutput, sql);
log("done");
var etherpadDB = mysql.createConnection({
host : settings.etherpadDB.host,
user : settings.etherpadDB.user,
password : settings.etherpadDB.password,
database : settings.etherpadDB.database,
port : settings.etherpadDB.port
});
//get the timestamp once
var timestamp = Date.now();
var padIDs;
async.series([
//get all padids out of the database...
function(callback)
{
log("get all padIds out of the database...");
etherpadDB.query("SELECT ID FROM PAD_META", [], function(err, _padIDs)
{
padIDs = _padIDs;
callback(err);
});
},
function(callback)
{
log("done");
//create a queue with a concurrency 100
var queue = async.queue(function (padId, callback)
{
convertPad(padId, function(err)
{
incrementPadStats();
callback(err);
});
}, 100);
//set the step callback as the queue callback
queue.drain = callback;
//add the padids to the worker queue
for(var i=0,length=padIDs.length;i<length;i++)
{
queue.push(padIDs[i].ID);
}
}
], function(err)
{
if(err) throw err;
//write the groups
var sql = "";
for(var proID in proID2groupID)
{
var groupID = proID2groupID[proID];
var subdomain = proID2subdomain[proID];
sql+="REPLACE INTO store VALUES (" + etherpadDB.escape("group:" + groupID) + ", " + etherpadDB.escape(JSON.stringify(groups[groupID]))+ ");\n";
sql+="REPLACE INTO store VALUES (" + etherpadDB.escape("mapper2group:subdomain:" + subdomain) + ", " + etherpadDB.escape(groupID)+ ");\n";
}
//close transaction
sql+="COMMIT;";
//end the sql file
fs.writeSync(sqlOutput, sql, undefined, "utf-8");
fs.closeSync(sqlOutput);
log("finished.");
process.exit(0);
});
function log(str)
{
console.log((Date.now() - startTime)/1000 + "\t" + str);
}
var padsDone = 0;
function incrementPadStats()
{
padsDone++;
if(padsDone%100 == 0)
{
var averageTime = Math.round(padsDone/((Date.now() - startTime)/1000));
log(padsDone + "/" + padIDs.length + "\t" + averageTime + " pad/s")
}
}
var proID2groupID = {};
var proID2subdomain = {};
var groups = {};
function convertPad(padId, callback)
{
var changesets = [];
var changesetsMeta = [];
var chatMessages = [];
var authors = [];
var apool;
var subdomain;
var padmeta;
async.series([
//get all needed db values
function(callback)
{
async.parallel([
//get the pad revisions
function(callback)
{
var sql = "SELECT * FROM `PAD_CHAT_TEXT` WHERE NUMID = (SELECT `NUMID` FROM `PAD_CHAT_META` WHERE ID=?)";
etherpadDB.query(sql, [padId], function(err, results)
{
if(!err)
{
try
{
//parse the pages
for(var i=0,length=results.length;i<length;i++)
{
parsePage(chatMessages, results[i].PAGESTART, results[i].OFFSETS, results[i].DATA, true);
}
}catch(e) {err = e}
}
callback(err);
});
},
//get the chat entries
function(callback)
{
var sql = "SELECT * FROM `PAD_REVS_TEXT` WHERE NUMID = (SELECT `NUMID` FROM `PAD_REVS_META` WHERE ID=?)";
etherpadDB.query(sql, [padId], function(err, results)
{
if(!err)
{
try
{
//parse the pages
for(var i=0,length=results.length;i<length;i++)
{
parsePage(changesets, results[i].PAGESTART, results[i].OFFSETS, results[i].DATA, false);
}
}catch(e) {err = e}
}
callback(err);
});
},
//get the pad revisions meta data
function(callback)
{
var sql = "SELECT * FROM `PAD_REVMETA_TEXT` WHERE NUMID = (SELECT `NUMID` FROM `PAD_REVMETA_META` WHERE ID=?)";
etherpadDB.query(sql, [padId], function(err, results)
{
if(!err)
{
try
{
//parse the pages
for(var i=0,length=results.length;i<length;i++)
{
parsePage(changesetsMeta, results[i].PAGESTART, results[i].OFFSETS, results[i].DATA, true);
}
}catch(e) {err = e}
}
callback(err);
});
},
//get the attribute pool of this pad
function(callback)
{
var sql = "SELECT `JSON` FROM `PAD_APOOL` WHERE `ID` = ?";
etherpadDB.query(sql, [padId], function(err, results)
{
if(!err)
{
try
{
apool=JSON.parse(results[0].JSON).x;
}catch(e) {err = e}
}
callback(err);
});
},
//get the authors informations
function(callback)
{
var sql = "SELECT * FROM `PAD_AUTHORS_TEXT` WHERE NUMID = (SELECT `NUMID` FROM `PAD_AUTHORS_META` WHERE ID=?)";
etherpadDB.query(sql, [padId], function(err, results)
{
if(!err)
{
try
{
//parse the pages
for(var i=0, length=results.length;i<length;i++)
{
parsePage(authors, results[i].PAGESTART, results[i].OFFSETS, results[i].DATA, true);
}
}catch(e) {err = e}
}
callback(err);
});
},
//get the pad information
function(callback)
{
var sql = "SELECT JSON FROM `PAD_META` WHERE ID=?";
etherpadDB.query(sql, [padId], function(err, results)
{
if(!err)
{
try
{
padmeta = JSON.parse(results[0].JSON).x;
}catch(e) {err = e}
}
callback(err);
});
},
//get the subdomain
function(callback)
{
//skip if this is no proPad
if(padId.indexOf("$") == -1)
{
callback();
return;
}
//get the proID out of this padID
var proID = padId.split("$")[0];
var sql = "SELECT subDomain FROM pro_domains WHERE ID = ?";
etherpadDB.query(sql, [proID], function(err, results)
{
if(!err)
{
subdomain = results[0].subDomain;
}
callback(err);
});
}
], callback);
},
function(callback)
{
//saves all values that should be written to the database
var values = {};
//this is a pro pad, let's convert it to a group pad
if(padId.indexOf("$") != -1)
{
var padIdParts = padId.split("$");
var proID = padIdParts[0];
var padName = padIdParts[1];
var groupID
//this proID is not converted so far, do it
if(proID2groupID[proID] == null)
{
groupID = "g." + randomString(16);
//create the mappers for this new group
proID2groupID[proID] = groupID;
proID2subdomain[proID] = subdomain;
groups[groupID] = {pads: {}};
}
//use the generated groupID;
groupID = proID2groupID[proID];
//rename the pad
padId = groupID + "$" + padName;
//set the value for this pad in the group
groups[groupID].pads[padId] = 1;
}
try
{
var newAuthorIDs = {};
var oldName2newName = {};
//replace the authors with generated authors
// we need to do that cause where the original etherpad saves pad local authors, the new (lite) etherpad uses them global
for(var i in apool.numToAttrib)
{
var key = apool.numToAttrib[i][0];
var value = apool.numToAttrib[i][1];
//skip non authors and anonymous authors
if(key != "author" || value == "")
continue;
//generate new author values
var authorID = "a." + randomString(16);
var authorColorID = authors[i].colorId || Math.floor(Math.random()*(exports.getColorPalette().length));
var authorName = authors[i].name || null;
//overwrite the authorID of the attribute pool
apool.numToAttrib[i][1] = authorID;
//write the author to the database
values["globalAuthor:" + authorID] = {"colorId" : authorColorID, "name": authorName, "timestamp": timestamp};
//save in mappers
newAuthorIDs[i] = authorID;
oldName2newName[value] = authorID;
}
//save all revisions
for(var i=0;i<changesets.length;i++)
{
values["pad:" + padId + ":revs:" + i] = {changeset: changesets[i],
meta : {
author: newAuthorIDs[changesetsMeta[i].a],
timestamp: changesetsMeta[i].t,
atext: changesetsMeta[i].atext || undefined
}};
}
//save all chat messages
for(var i=0;i<chatMessages.length;i++)
{
values["pad:" + padId + ":chat:" + i] = {"text": chatMessages[i].lineText,
"userId": oldName2newName[chatMessages[i].userId],
"time": chatMessages[i].time}
}
//generate the latest atext
var fullAPool = (new AttributePool()).fromJsonable(apool);
var keyRev = Math.floor(padmeta.head / padmeta.keyRevInterval) * padmeta.keyRevInterval;
var atext = changesetsMeta[keyRev].atext;
var curRev = keyRev;
while (curRev < padmeta.head)
{
curRev++;
var changeset = changesets[curRev];
atext = Changeset.applyToAText(changeset, atext, fullAPool);
}
values["pad:" + padId] = {atext: atext,
pool: apool,
head: padmeta.head,
chatHead: padmeta.numChatMessages }
}
catch(e)
{
console.error("Error while converting pad " + padId + ", pad skipped");
console.error(e.stack ? e.stack : JSON.stringify(e));
callback();
return;
}
var sql = "";
for(var key in values)
{
sql+="REPLACE INTO store VALUES (" + etherpadDB.escape(key) + ", " + etherpadDB.escape(JSON.stringify(values[key]))+ ");\n";
}
fs.writeSync(sqlOutput, sql, undefined, "utf-8");
callback();
}
], callback);
}
/**
* This parses a Page like Etherpad uses them in the databases
* The offsets describes the length of a unit in the page, the data are
* all values behind each other
*/
function parsePage(array, pageStart, offsets, data, json)
{
var start = 0;
var lengths = offsets.split(",");
for(var i=0;i<lengths.length;i++)
{
var unitLength = lengths[i];
//skip empty units
if(unitLength == "")
continue;
//parse the number
unitLength = Number(unitLength);
//cut the unit out of data
var unit = data.substr(start, unitLength);
//put it into the array
array[pageStart + i] = json ? JSON.parse(unit) : unit;
//update start
start+=unitLength;
}
}

View File

@ -1,51 +0,0 @@
/*
* A tool for deleting ALL GROUP sessions Etherpad user sessions from the CLI,
* because sometimes a brick is required to fix a face.
*/
const request = require('../src/node_modules/request');
const settings = require(__dirname+'/../tests/container/loadSettings').loadSettings();
const supertest = require(__dirname+'/../src/node_modules/supertest');
const api = supertest('http://'+settings.ip+":"+settings.port);
const path = require('path');
const fs = require('fs');
// get the API Key
var filePath = path.join(__dirname, '../APIKEY.txt');
var apikey = fs.readFileSync(filePath, {encoding: 'utf-8'});
// Set apiVersion to base value, we change this later.
var apiVersion = 1;
var guids;
// Update the apiVersion
api.get('/api/')
.expect(function(res){
apiVersion = res.body.currentVersion;
if (!res.body.currentVersion) throw new Error("No version set in API");
return;
})
.then(function(){
let guri = '/api/'+apiVersion+'/listAllGroups?apikey='+apikey;
api.get(guri)
.then(function(res){
guids = res.body.data.groupIDs;
guids.forEach(function(groupID){
let luri = '/api/'+apiVersion+'/listSessionsOfGroup?apikey='+apikey + "&groupID="+groupID;
api.get(luri)
.then(function(res){
if(res.body.data){
Object.keys(res.body.data).forEach(function(sessionID){
if(sessionID){
console.log("Deleting", sessionID);
let duri = '/api/'+apiVersion+'/deleteSession?apikey='+apikey + "&sessionID="+sessionID;
api.post(duri); // deletes
}
})
}else{
// no session in this group.
}
})
})
})
})

View File

@ -1,50 +0,0 @@
/*
* A tool for deleting pads from the CLI, because sometimes a brick is required
* to fix a window.
*/
const request = require('../src/node_modules/request');
const settings = require(__dirname+'/../tests/container/loadSettings').loadSettings();
const supertest = require(__dirname+'/../src/node_modules/supertest');
const api = supertest('http://'+settings.ip+":"+settings.port);
const path = require('path');
const fs = require('fs');
if (process.argv.length != 3) {
console.error("Use: node deletePad.js $PADID");
process.exit(1);
}
// get the padID
let padId = process.argv[2];
// get the API Key
var filePath = path.join(__dirname, '../APIKEY.txt');
var apikey = fs.readFileSync(filePath, {encoding: 'utf-8'});
// Set apiVersion to base value, we change this later.
var apiVersion = 1;
// Update the apiVersion
api.get('/api/')
.expect(function(res){
apiVersion = res.body.currentVersion;
if (!res.body.currentVersion) throw new Error("No version set in API");
return;
})
.end(function(err, res){
// Now we know the latest API version, let's delete pad
var uri = '/api/'+apiVersion+'/deletePad?apikey='+apikey+'&padID='+padId;
api.post(uri)
.expect(function(res){
if (res.body.code === 1){
console.error("Error deleting pad", res.body);
}else{
console.log("Deleted pad", res.body);
}
return;
})
.end(function(){})
});
// end

View File

@ -1,48 +0,0 @@
#!/usr/bin/env PYTHONUNBUFFERED=1 python
#
# Created by Bjarni R. Einarsson, placed in the public domain. Go wild!
#
import json
import os
import sys
try:
dirtydb_input = sys.argv[1]
dirtydb_output = '%s.new' % dirtydb_input
assert(os.path.exists(dirtydb_input))
assert(not os.path.exists(dirtydb_output))
except:
print()
print('Usage: %s /path/to/dirty.db' % sys.argv[0])
print()
print('Note: Will create a file named dirty.db.new in the same folder,')
print(' please make sure permissions are OK and a file by that')
print(' name does not exist already. This script works by omitting')
print(' duplicate lines from the dirty.db file, keeping only the')
print(' last (latest) instance. No revision data should be lost,')
print(' but be careful, make backups. If it breaks you get to keep')
print(' both pieces!')
print()
sys.exit(1)
dirtydb = {}
lines = 0
with open(dirtydb_input, 'r') as fd:
print('Reading %s' % dirtydb_input)
for line in fd:
lines += 1
try:
data = json.loads(line)
dirtydb[data['key']] = line
except:
print("Skipping invalid JSON!")
if lines % 10000 == 0:
sys.stderr.write('.')
print()
print('OK, found %d unique keys in %d lines' % (len(dirtydb), lines))
with open(dirtydb_output, 'w') as fd:
for data in list(dirtydb.values()):
fd.write(data)
print('Wrote data to %s. All done!' % dirtydb_output)

View File

@ -1,13 +0,0 @@
{
"name": "node-doc-generator",
"version": "0.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"marked": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz",
"integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw=="
}
}
}

View File

@ -1,75 +0,0 @@
/*
* This is a debug tool. It helps to extract all datas of a pad and move it from
* a productive environment and to a develop environment to reproduce bugs
* there. It outputs a dirtydb file
*/
if (process.argv.length != 3) {
console.error("Use: node extractPadData.js $PADID");
process.exit(1);
}
// get the padID
let padId = process.argv[2];
let npm = require('../src/node_modules/npm');
npm.load({}, async function(er) {
if (er) {
console.error("Could not load NPM: " + er)
process.exit(1);
}
try {
// initialize database
let settings = require('../src/node/utils/Settings');
let db = require('../src/node/db/DB');
await db.init();
// load extra modules
let dirtyDB = require('../src/node_modules/dirty');
let padManager = require('../src/node/db/PadManager');
let util = require('util');
// initialize output database
let dirty = dirtyDB(padId + '.db');
// Promise wrapped get and set function
let wrapped = db.db.db.wrappedDB;
let get = util.promisify(wrapped.get.bind(wrapped));
let set = util.promisify(dirty.set.bind(dirty));
// array in which required key values will be accumulated
let neededDBValues = ['pad:' + padId];
// get the actual pad object
let pad = await padManager.getPad(padId);
// add all authors
neededDBValues.push(...pad.getAllAuthors().map(author => 'globalAuthor:' + author));
// add all revisions
for (let rev = 0; rev <= pad.head; ++rev) {
neededDBValues.push('pad:' + padId + ':revs:' + rev);
}
// add all chat values
for (let chat = 0; chat <= pad.chatHead; ++chat) {
neededDBValues.push('pad:' + padId + ':chat:' + chat);
}
for (let dbkey of neededDBValues) {
let dbvalue = await get(dbkey);
if (dbvalue && typeof dbvalue !== 'object') {
dbvalue = JSON.parse(dbvalue);
}
await set(dbkey, dbvalue);
}
console.log('finished');
process.exit(0);
} catch (er) {
console.error(er);
process.exit(1);
}
});

View File

@ -1,110 +0,0 @@
var startTime = Date.now();
require("ep_etherpad-lite/node_modules/npm").load({}, function(er,npm) {
var fs = require("fs");
var ueberDB = require("ep_etherpad-lite/node_modules/ueberdb2");
var settings = require("ep_etherpad-lite/node/utils/Settings");
var log4js = require('ep_etherpad-lite/node_modules/log4js');
var dbWrapperSettings = {
cache: 0,
writeInterval: 100,
json: false // data is already json encoded
};
var db = new ueberDB.database(settings.dbType, settings.dbSettings, dbWrapperSettings, log4js.getLogger("ueberDB"));
var sqlFile = process.argv[2];
//stop if the settings file is not set
if(!sqlFile)
{
console.error("Use: node importSqlFile.js $SQLFILE");
process.exit(1);
}
log("initializing db");
db.init(function(err)
{
//there was an error while initializing the database, output it and stop
if(err)
{
console.error("ERROR: Problem while initializing the database");
console.error(err.stack ? err.stack : err);
process.exit(1);
}
else
{
log("done");
log("open output file...");
var lines = fs.readFileSync(sqlFile, 'utf8').split("\n");
var count = lines.length;
var keyNo = 0;
process.stdout.write("Start importing " + count + " keys...\n");
lines.forEach(function(l) {
if (l.substr(0, 27) == "REPLACE INTO store VALUES (") {
var pos = l.indexOf("', '");
var key = l.substr(28, pos - 28);
var value = l.substr(pos + 3);
value = value.substr(0, value.length - 2);
console.log("key: " + key + " val: " + value);
console.log("unval: " + unescape(value));
db.set(key, unescape(value), null);
keyNo++;
if (keyNo % 1000 == 0) {
process.stdout.write(" " + keyNo + "/" + count + "\n");
}
}
});
process.stdout.write("\n");
process.stdout.write("done. waiting for db to finish transaction. depended on dbms this may take some time...\n");
db.doShutdown(function() {
log("finished, imported " + keyNo + " keys.");
process.exit(0);
});
}
});
});
function log(str)
{
console.log((Date.now() - startTime)/1000 + "\t" + str);
}
unescape = function(val) {
// value is a string
if (val.substr(0, 1) == "'") {
val = val.substr(0, val.length - 1).substr(1);
return val.replace(/\\[0nrbtZ\\'"]/g, function(s) {
switch(s) {
case "\\0": return "\0";
case "\\n": return "\n";
case "\\r": return "\r";
case "\\b": return "\b";
case "\\t": return "\t";
case "\\Z": return "\x1a";
default: return s.substr(1);
}
});
}
// value is a boolean or NULL
if (val == 'NULL') {
return null;
}
if (val == 'true') {
return true;
}
if (val == 'false') {
return false;
}
// value is a number
return val;
};

View File

@ -1,98 +0,0 @@
#!/bin/sh
# minimum required node version
REQUIRED_NODE_MAJOR=10
REQUIRED_NODE_MINOR=13
# minimum required npm version
REQUIRED_NPM_MAJOR=5
REQUIRED_NPM_MINOR=5
pecho() { printf %s\\n "$*"; }
log() { pecho "$@"; }
error() { log "ERROR: $@" >&2; }
fatal() { error "$@"; exit 1; }
is_cmd() { command -v "$@" >/dev/null 2>&1; }
require_minimal_version() {
PROGRAM_LABEL="$1"
VERSION_STRING="$2"
REQUIRED_MAJOR="$3"
REQUIRED_MINOR="$4"
# Flag -s (--only-delimited on GNU cut) ensures no string is returned
# when there is no match
DETECTED_MAJOR=$(pecho "$VERSION_STRING" | cut -s -d "." -f 1)
DETECTED_MINOR=$(pecho "$VERSION_STRING" | cut -s -d "." -f 2)
[ -n "$DETECTED_MAJOR" ] || fatal "Cannot extract $PROGRAM_LABEL major version from version string \"$VERSION_STRING\""
[ -n "$DETECTED_MINOR" ] || fatal "Cannot extract $PROGRAM_LABEL minor version from version string \"$VERSION_STRING\""
case "$DETECTED_MAJOR" in
''|*[!0-9]*)
fatal "$PROGRAM_LABEL major version from \"$VERSION_STRING\" is not a number. Detected: \"$DETECTED_MAJOR\""
;;
esac
case "$DETECTED_MINOR" in
''|*[!0-9]*)
fatal "$PROGRAM_LABEL minor version from \"$VERSION_STRING\" is not a number. Detected: \"$DETECTED_MINOR\""
esac
[ "$DETECTED_MAJOR" -gt "$REQUIRED_MAJOR" ] || ([ "$DETECTED_MAJOR" -eq "$REQUIRED_MAJOR" ] && [ "$DETECTED_MINOR" -ge "$REQUIRED_MINOR" ]) \
|| fatal "Your $PROGRAM_LABEL version \"$VERSION_STRING\" is too old. $PROGRAM_LABEL $REQUIRED_MAJOR.$REQUIRED_MINOR.x or higher is required."
}
# Move to the folder where ep-lite is installed
cd "$(dirname "$0")"/..
# Is node installed?
# Not checking io.js, default installation creates a symbolic link to node
is_cmd node || fatal "Please install node.js ( https://nodejs.org )"
# Is npm installed?
is_cmd npm || fatal "Please install npm ( https://npmjs.org )"
# Check npm version
NPM_VERSION_STRING=$(npm --version)
require_minimal_version "npm" "$NPM_VERSION_STRING" "$REQUIRED_NPM_MAJOR" "$REQUIRED_NPM_MINOR"
# Check node version
NODE_VERSION_STRING=$(node --version)
NODE_VERSION_STRING=${NODE_VERSION_STRING#"v"}
require_minimal_version "nodejs" "$NODE_VERSION_STRING" "$REQUIRED_NODE_MAJOR" "$REQUIRED_NODE_MINOR"
# Get the name of the settings file
settings="settings.json"
a='';
for arg in "$@"; do
if [ "$a" = "--settings" ] || [ "$a" = "-s" ]; then settings=$arg; fi
a=$arg
done
# Does a $settings exist? if not copy the template
if [ ! -f "$settings" ]; then
log "Copy the settings template to $settings..."
cp settings.json.template "$settings" || exit 1
fi
log "Ensure that all dependencies are up to date... If this is the first time you have run Etherpad please be patient."
(
mkdir -p node_modules
cd node_modules
[ -e ep_etherpad-lite ] || ln -s ../src ep_etherpad-lite
cd ep_etherpad-lite
npm ci
) || {
rm -rf src/node_modules
exit 1
}
# Remove all minified data to force node creating it new
log "Clearing minified cache..."
rm -f var/minified*
exit 0

View File

@ -1,49 +0,0 @@
require("ep_etherpad-lite/node_modules/npm").load({}, function(er,npm) {
process.chdir(npm.root+'/..')
// This script requires that you have modified your settings.json file
// to work with a real database. Please make a backup of your dirty.db
// file before using this script, just to be safe.
// It might be necessary to run the script using more memory:
// `node --max-old-space-size=4096 bin/migrateDirtyDBtoRealDB.js`
var settings = require("ep_etherpad-lite/node/utils/Settings");
var dirty = require("../src/node_modules/dirty");
var ueberDB = require("../src/node_modules/ueberdb2");
var log4js = require("../src/node_modules/log4js");
var dbWrapperSettings = {
"cache": "0", // The cache slows things down when you're mostly writing.
"writeInterval": 0 // Write directly to the database, don't buffer
};
var db = new ueberDB.database(settings.dbType, settings.dbSettings, dbWrapperSettings, log4js.getLogger("ueberDB"));
var i = 0;
var length = 0;
db.init(function() {
console.log("Waiting for dirtyDB to parse its file.");
dirty = dirty('var/dirty.db').on("load", function() {
dirty.forEach(function(){
length++;
});
console.log(`Found ${length} records, processing now.`);
dirty.forEach(async function(key, value) {
let error = await db.set(key, value);
console.log(`Wrote record ${i}`);
i++;
if (i === length) {
console.log("finished, just clearing up for a bit...");
setTimeout(function() {
process.exit(0);
}, 5000);
}
});
console.log("Please wait for all records to flush to database, then kill this process.");
});
console.log("done?")
});
});

View File

@ -1,46 +0,0 @@
The files in this folder are for Plugin developers.
# Get suggestions to improve your Plugin
This code will check your plugin for known usual issues and some suggestions for improvements. No changes will be made to your project.
```
node bin/plugins/checkPlugin.js $PLUGIN_NAME$
```
# Basic Example:
```
node bin/plugins/checkPlugin.js ep_webrtc
```
## Autofixing - will autofix any issues it can
```
node bin/plugins/checkPlugins.js ep_whatever autofix
```
## Autocommitting, push, npm minor patch and npm publish (highly dangerous)
```
node bin/plugins/checkPlugins.js ep_whatever autofix autocommit
```
# All the plugins
Replace johnmclear with your github username
```
# Clones
cd node_modules
GHUSER=johnmclear; curl "https://api.github.com/users/$GHUSER/repos?per_page=1000" | grep -o 'git@[^"]*' | grep /ep_ | xargs -L1 git clone
cd ..
# autofixes and autocommits /pushes & npm publishes
for dir in `ls node_modules`;
do
# echo $0
if [[ $dir == *"ep_"* ]]; then
if [[ $dir != "ep_etherpad-lite" ]]; then
node bin/plugins/checkPlugin.js $dir autofix autocommit
fi
fi
# echo $dir
done
```

View File

@ -1,246 +0,0 @@
// pro usage for all your plugins, replace johnmclear with your github username
/*
cd node_modules
GHUSER=johnmclear; curl "https://api.github.com/users/$GHUSER/repos?per_page=1000" | grep -o 'git@[^"]*' | grep /ep_ | xargs -L1 git clone
cd ..
for dir in `ls node_modules`;
do
# echo $0
if [[ $dir == *"ep_"* ]]; then
if [[ $dir != "ep_etherpad-lite" ]]; then
node bin/plugins/checkPlugin.js $dir autofix autocommit
fi
fi
# echo $dir
done
*/
/*
*
* Usage
*
* Normal usage: node bin/plugins/checkPlugins.js ep_whatever
* Auto fix the things it can: node bin/plugins/checkPlugins.js ep_whatever autofix
* Auto commit, push and publish(to npm) * highly dangerous:
node bin/plugins/checkPlugins.js ep_whatever autofix autocommit
*/
const fs = require("fs");
const { exec } = require("child_process");
// get plugin name & path from user input
const pluginName = process.argv[2];
const pluginPath = "node_modules/"+pluginName;
console.log("Checking the plugin: "+ pluginName)
// Should we autofix?
if (process.argv[3] && process.argv[3] === "autofix") var autoFix = true;
// Should we update files where possible?
if (process.argv[5] && process.argv[5] === "autoupdate") var autoUpdate = true;
// Should we automcommit and npm publish?!
if (process.argv[4] && process.argv[4] === "autocommit") var autoCommit = true;
if(autoCommit){
console.warn("Auto commit is enabled, I hope you know what you are doing...")
}
fs.readdir(pluginPath, function (err, rootFiles) {
//handling error
if (err) {
return console.log('Unable to scan directory: ' + err);
}
// rewriting files to lower case
var files = [];
// some files we need to know the actual file name. Not compulsory but might help in the future.
var readMeFileName;
var repository;
var hasAutofixed = false;
for (var i = 0; i < rootFiles.length; i++) {
if(rootFiles[i].toLowerCase().indexOf("readme") !== -1) readMeFileName = rootFiles[i];
files.push(rootFiles[i].toLowerCase());
}
if(files.indexOf("package.json") === -1){
console.warn("no package.json, please create");
}
if(files.indexOf("package.json") !== -1){
let packageJSON = fs.readFileSync(pluginPath+"/package.json", {encoding:'utf8', flag:'r'});
if(packageJSON.toLowerCase().indexOf("repository") === -1){
console.warn("No repository in package.json");
if(autoFix){
console.warn("Repository not detected in package.json. Please add repository section manually.")
}
}else{
// useful for creating README later.
repository = JSON.parse(packageJSON).repository.url;
}
}
if(files.indexOf("readme") === -1 && files.indexOf("readme.md") === -1){
console.warn("README.md file not found, please create");
if(autoFix){
console.log("Autofixing missing README.md file, please edit the README.md file further to include plugin specific details.");
let readme = fs.readFileSync("bin/plugins/lib/README.md", {encoding:'utf8', flag:'r'})
readme = readme.replace(/\[plugin_name\]/g, pluginName);
if(repository){
let org = repository.split("/")[3];
let name = repository.split("/")[4];
readme = readme.replace(/\[org_name\]/g, org);
readme = readme.replace(/\[repo_url\]/g, name);
fs.writeFileSync(pluginPath+"/README.md", readme);
}else{
console.warn("Unable to find repository in package.json, aborting.")
}
}
}
if(files.indexOf("readme") !== -1 && files.indexOf("readme.md") !== -1){
let readme = fs.readFileSync(pluginPath+"/"+readMeFileName, {encoding:'utf8', flag:'r'});
if(readme.toLowerCase().indexOf("license") === -1){
console.warn("No license section in README");
if(autoFix){
console.warn("Please add License section to README manually.")
}
}
}
if(files.indexOf("license") === -1 && files.indexOf("license.md") === -1){
console.warn("LICENSE.md file not found, please create");
if(autoFix){
hasAutofixed = true;
console.log("Autofixing missing LICENSE.md file, including Apache 2 license.");
exec("git config user.name", (error, name, stderr) => {
if (error) {
console.log(`error: ${error.message}`);
return;
}
if (stderr) {
console.log(`stderr: ${stderr}`);
return;
}
let license = fs.readFileSync("bin/plugins/lib/LICENSE.md", {encoding:'utf8', flag:'r'});
license = license.replace("[yyyy]", new Date().getFullYear());
license = license.replace("[name of copyright owner]", name)
fs.writeFileSync(pluginPath+"/LICENSE.md", license);
});
}
}
var travisConfig = fs.readFileSync("bin/plugins/lib/travis.yml", {encoding:'utf8', flag:'r'});
travisConfig = travisConfig.replace(/\[plugin_name\]/g, pluginName);
if(files.indexOf(".travis.yml") === -1){
console.warn(".travis.yml file not found, please create. .travis.yml is used for automatically CI testing Etherpad. It is useful to know if your plugin breaks another feature for example.")
// TODO: Make it check version of the .travis file to see if it needs an update.
if(autoFix){
hasAutofixed = true;
console.log("Autofixing missing .travis.yml file");
fs.writeFileSync(pluginPath+"/.travis.yml", travisConfig);
console.log("Travis file created, please sign into travis and enable this repository")
}
}
if(autoFix && autoUpdate){
// checks the file versioning of .travis and updates it to the latest.
let existingConfig = fs.readFileSync(pluginPath + "/.travis.yml", {encoding:'utf8', flag:'r'});
let existingConfigLocation = existingConfig.indexOf("##ETHERPAD_TRAVIS_V=");
let existingValue = existingConfig.substr(existingConfigLocation+20, existingConfig.length);
let newConfigLocation = travisConfig.indexOf("##ETHERPAD_TRAVIS_V=");
let newValue = travisConfig.substr(newConfigLocation+20, travisConfig.length);
if(existingConfigLocation === -1){
console.warn("no previous .travis.yml version found so writing new.")
// we will write the newTravisConfig to the location.
fs.writeFileSync(pluginPath + "/.travis.yml", travisConfig);
}else{
if(newValue > existingValue){
console.log("updating .travis.yml");
fs.writeFileSync(pluginPath + "/.travis.yml", travisConfig);
hasAutofixed = true;
}
}
}
if(files.indexOf(".gitignore") === -1){
console.warn(".gitignore file not found, please create. .gitignore files are useful to ensure files aren't incorrectly commited to a repository.")
if(autoFix){
hasAutofixed = true;
console.log("Autofixing missing .gitignore file");
let gitignore = fs.readFileSync("bin/plugins/lib/gitignore", {encoding:'utf8', flag:'r'});
fs.writeFileSync(pluginPath+"/.gitignore", gitignore);
}
}
if(files.indexOf("locales") === -1){
console.warn("Translations not found, please create. Translation files help with Etherpad accessibility.");
}
if(files.indexOf(".ep_initialized") !== -1){
console.warn(".ep_initialized found, please remove. .ep_initialized should never be commited to git and should only exist once the plugin has been executed one time.")
if(autoFix){
hasAutofixed = true;
console.log("Autofixing incorrectly existing .ep_initialized file");
fs.unlinkSync(pluginPath+"/.ep_initialized");
}
}
if(files.indexOf("npm-debug.log") !== -1){
console.warn("npm-debug.log found, please remove. npm-debug.log should never be commited to your repository.")
if(autoFix){
hasAutofixed = true;
console.log("Autofixing incorrectly existing npm-debug.log file");
fs.unlinkSync(pluginPath+"/npm-debug.log");
}
}
if(files.indexOf("static") !== -1){
fs.readdir(pluginPath+"/static", function (errRead, staticFiles) {
if(staticFiles.indexOf("tests") === -1){
console.warn("Test files not found, please create tests. https://github.com/ether/etherpad-lite/wiki/Creating-a-plugin#writing-and-running-front-end-tests-for-your-plugin")
}
})
}else{
console.warn("Test files not found, please create tests. https://github.com/ether/etherpad-lite/wiki/Creating-a-plugin#writing-and-running-front-end-tests-for-your-plugin")
}
if(hasAutofixed){
console.log("Fixes applied, please check git diff then run the following command:\n\n")
// bump npm Version
if(autoCommit){
// holy shit you brave.
console.log("Attempting autocommit and auto publish to npm")
exec("cd node_modules/"+ pluginName + " && git add -A && git commit --allow-empty -m 'autofixes from Etherpad checkPlugins.js' && npm version patch && git add package.json && git commit --allow-empty -m 'bump version' && git push && npm publish && cd ../..", (error, name, stderr) => {
if (error) {
console.log(`error: ${error.message}`);
return;
}
if (stderr) {
console.log(`stderr: ${stderr}`);
return;
}
console.log("I think she's got it! By George she's got it!")
process.exit(0)
});
}else{
console.log("cd node_modules/"+ pluginName + " && git add -A && git commit --allow-empty -m 'autofixes from Etherpad checkPlugins.js' && npm version patch && git add package.json && git commit --allow-empty -m 'bump version' && git push && npm publish && cd ../..")
}
}
//listing all files using forEach
files.forEach(function (file) {
// Do whatever you want to do with the file
// console.log(file.toLowerCase());
});
});

View File

@ -1,13 +0,0 @@
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -1,28 +0,0 @@
[![Travis (.org)](https://api.travis-ci.org/[org_name]/[repo_url].svg?branch=develop)](https://travis-ci.org/github/[org_name]/[repo_url])
# My awesome plugin README example
Explain what your plugin does and who it's useful for.
## Example animated gif of usage if appropriate
## Installing
npm install [plugin_name]
or Use the Etherpad ``/admin`` interface.
## Settings
Document settings if any
## Testing
Document how to run backend / frontend tests.
### Frontend
Visit http://whatever/tests/frontend/ to run the frontend tests.
### backend
Type ``cd src && npm run test`` to run the backend tests.
## LICENSE
Apache 2.0

View File

@ -1,68 +0,0 @@
language: node_js
node_js:
- "lts/*"
cache: false
before_install:
- sudo add-apt-repository -y ppa:libreoffice/ppa
- sudo apt-get update
- sudo apt-get -y install libreoffice
- sudo apt-get -y install libreoffice-pdfimport
services:
- docker
install:
- "bin/installDeps.sh"
- "export GIT_HASH=$(git rev-parse --verify --short HEAD)"
before_script:
- "tests/frontend/travis/sauce_tunnel.sh"
script:
- "tests/frontend/travis/runner.sh"
env:
global:
- secure: "WMGxFkOeTTlhWB+ChMucRtIqVmMbwzYdNHuHQjKCcj8HBEPdZLfCuK/kf4rG\nVLcLQiIsyllqzNhBGVHG1nyqWr0/LTm8JRqSCDDVIhpyzp9KpCJQQJG2Uwjk\n6/HIJJh/wbxsEdLNV2crYU/EiVO3A4Bq0YTHUlbhUqG3mSCr5Ec="
- secure: "gejXUAHYscbR6Bodw35XexpToqWkv2ifeECsbeEmjaLkYzXmUUNWJGknKSu7\nEUsSfQV8w+hxApr1Z+jNqk9aX3K1I4btL3cwk2trnNI8XRAvu1c1Iv60eerI\nkE82Rsd5lwUaMEh+/HoL8ztFCZamVndoNgX7HWp5J/NRZZMmh4g="
jobs:
include:
- name: "Run the Backend tests"
install:
- "npm install"
- "mkdir [plugin_name]"
- "mv !([plugin_name]) [plugin_name]"
- "git clone https://github.com/ether/etherpad-lite.git etherpad"
- "cd etherpad"
- "mkdir node_modules"
- "mv ../[plugin_name] node_modules"
- "bin/installDeps.sh"
- "export GIT_HASH=$(git rev-parse --verify --short HEAD)"
- "cd src && npm install && cd -"
script:
- "tests/frontend/travis/runnerBackend.sh"
- name: "Test the Frontend"
install:
- "npm install"
- "mkdir [plugin_name]"
- "mv !([plugin_name]) [plugin_name]"
- "git clone https://github.com/ether/etherpad-lite.git etherpad"
- "cd etherpad"
- "mkdir node_modules"
- "mv ../[plugin_name] node_modules"
- "bin/installDeps.sh"
- "export GIT_HASH=$(git rev-parse --verify --short HEAD)"
script:
- "tests/frontend/travis/runner.sh"
notifications:
irc:
channels:
- "irc.freenode.org#etherpad-lite-dev"
##ETHERPAD_TRAVIS_V=3
## Travis configuration automatically created using bin/plugins/updateAllPluginsScript.sh

View File

@ -1,122 +0,0 @@
/*
This is a repair tool. It rebuilds an old pad at a new pad location up to a
known "good" revision.
*/
if(process.argv.length != 4 && process.argv.length != 5) {
console.error("Use: node bin/repairPad.js $PADID $REV [$NEWPADID]");
process.exit(1);
}
var npm = require("../src/node_modules/npm");
var async = require("../src/node_modules/async");
var ueberDB = require("../src/node_modules/ueberdb2");
var padId = process.argv[2];
var newRevHead = process.argv[3];
var newPadId = process.argv[4] || padId + "-rebuilt";
var db, oldPad, newPad, settings;
var AuthorManager, ChangeSet, Pad, PadManager;
async.series([
function(callback) {
npm.load({}, function(err) {
if(err) {
console.error("Could not load NPM: " + err)
process.exit(1);
} else {
callback();
}
})
},
function(callback) {
// Get a handle into the database
db = require('../src/node/db/DB');
db.init(callback);
}, function(callback) {
PadManager = require('../src/node/db/PadManager');
Pad = require('../src/node/db/Pad').Pad;
// Get references to the original pad and to a newly created pad
// HACK: This is a standalone script, so we want to write everything
// out to the database immediately. The only problem with this is
// that a driver (like the mysql driver) can hardcode these values.
db.db.db.settings = {cache: 0, writeInterval: 0, json: true};
// Validate the newPadId if specified and that a pad with that ID does
// not already exist to avoid overwriting it.
if (!PadManager.isValidPadId(newPadId)) {
console.error("Cannot create a pad with that id as it is invalid");
process.exit(1);
}
PadManager.doesPadExists(newPadId, function(err, exists) {
if (exists) {
console.error("Cannot create a pad with that id as it already exists");
process.exit(1);
}
});
PadManager.getPad(padId, function(err, pad) {
oldPad = pad;
newPad = new Pad(newPadId);
callback();
});
}, function(callback) {
// Clone all Chat revisions
var chatHead = oldPad.chatHead;
for(var i = 0, curHeadNum = 0; i <= chatHead; i++) {
db.db.get("pad:" + padId + ":chat:" + i, function (err, chat) {
db.db.set("pad:" + newPadId + ":chat:" + curHeadNum++, chat);
console.log("Created: Chat Revision: pad:" + newPadId + ":chat:" + curHeadNum);
});
}
callback();
}, function(callback) {
// Rebuild Pad from revisions up to and including the new revision head
AuthorManager = require("../src/node/db/AuthorManager");
Changeset = require("ep_etherpad-lite/static/js/Changeset");
// Author attributes are derived from changesets, but there can also be
// non-author attributes with specific mappings that changesets depend on
// and, AFAICT, cannot be recreated any other way
newPad.pool.numToAttrib = oldPad.pool.numToAttrib;
for(var curRevNum = 0; curRevNum <= newRevHead; curRevNum++) {
db.db.get("pad:" + padId + ":revs:" + curRevNum, function(err, rev) {
if (rev.meta) {
throw "The specified revision number could not be found.";
}
var newRevNum = ++newPad.head;
var newRevId = "pad:" + newPad.id + ":revs:" + newRevNum;
db.db.set(newRevId, rev);
AuthorManager.addPad(rev.meta.author, newPad.id);
newPad.atext = Changeset.applyToAText(rev.changeset, newPad.atext, newPad.pool);
console.log("Created: Revision: pad:" + newPad.id + ":revs:" + newRevNum);
if (newRevNum == newRevHead) {
callback();
}
});
}
}, function(callback) {
// Add saved revisions up to the new revision head
console.log(newPad.head);
var newSavedRevisions = [];
for(var i in oldPad.savedRevisions) {
savedRev = oldPad.savedRevisions[i]
if (savedRev.revNum <= newRevHead) {
newSavedRevisions.push(savedRev);
console.log("Added: Saved Revision: " + savedRev.revNum);
}
}
newPad.savedRevisions = newSavedRevisions;
callback();
}, function(callback) {
// Save the source pad
db.db.set("pad:"+newPadId, newPad, function(err) {
console.log("Created: Source Pad: pad:" + newPadId);
newPad.saveToDatabase().then(() => callback(), callback);
});
}
], function (err) {
if(err) throw err;
else {
console.info("finished");
process.exit(0);
}
});

View File

@ -1,78 +0,0 @@
/*
* This is a repair tool. It extracts all datas of a pad, removes and inserts them again.
*/
console.warn("WARNING: This script must not be used while etherpad is running!");
if (process.argv.length != 3) {
console.error("Use: node bin/repairPad.js $PADID");
process.exit(1);
}
// get the padID
var padId = process.argv[2];
let npm = require("../src/node_modules/npm");
npm.load({}, async function(er) {
if (er) {
console.error("Could not load NPM: " + er)
process.exit(1);
}
try {
// intialize database
let settings = require('../src/node/utils/Settings');
let db = require('../src/node/db/DB');
await db.init();
// get the pad
let padManager = require('../src/node/db/PadManager');
let pad = await padManager.getPad(padId);
// accumulate the required keys
let neededDBValues = ["pad:" + padId];
// add all authors
neededDBValues.push(...pad.getAllAuthors().map(author => "globalAuthor:"));
// add all revisions
for (let rev = 0; rev <= pad.head; ++rev) {
neededDBValues.push("pad:" + padId + ":revs:" + rev);
}
// add all chat values
for (let chat = 0; chat <= pad.chatHead; ++chat) {
neededDBValues.push("pad:" + padId + ":chat:" + chat);
}
//
// NB: this script doesn't actually does what's documented
// since the `value` fields in the following `.forEach`
// block are just the array index numbers
//
// the script therefore craps out now before it can do
// any damage.
//
// See gitlab issue #3545
//
console.info("aborting [gitlab #3545]");
process.exit(1);
// now fetch and reinsert every key
neededDBValues.forEach(function(key, value) {
console.log("Key: " + key+ ", value: " + value);
db.remove(key);
db.set(key, value);
});
console.info("finished");
process.exit(0);
} catch (er) {
if (er.name === "apierror") {
console.error(er);
} else {
console.trace(er);
}
}
});

View File

@ -1,20 +0,0 @@
#!/bin/sh
#Move to the folder where ep-lite is installed
cd $(dirname $0)
#Was this script started in the bin folder? if yes move out
if [ -d "../bin" ]; then
cd "../"
fi
# npm outdated --depth=0 | grep -v "^Package" | awk '{print $1}' | xargs npm install $1 --save-dev
OUTDATED=$(npm outdated --depth=0 | grep -v "^Package" | awk '{print $1}')
# echo $OUTDATED
if test -n "$OUTDATED"; then
echo "Plugins require update, doing this now..."
echo "Updating $OUTDATED"
npm install $OUTDATED --save-dev
else
echo "Plugins are all up to date"
fi

19
doc/api/api.adoc Normal file
View File

@ -0,0 +1,19 @@
include::./embed_parameters.adoc[]
include::./http_api.adoc[]
include::./hooks_overview.adoc[]
include::./hooks_client-side.adoc[]
include::./hooks_server-side.adoc[]
include::./editorInfo.adoc[]
include::./changeset_library.adoc[]
include::./pluginfw.adoc[]
include::./toolbar.adoc[]
include::./editbar.adoc[]

View File

@ -1,10 +0,0 @@
@include embed_parameters
@include http_api
@include hooks_overview
@include hooks_client-side
@include hooks_server-side
@include editorInfo
@include changeset_library
@include pluginfw
@include toolbar
@include editbar

View File

@ -0,0 +1,46 @@
== Changeset Library
The https://github.com/ether/etherpad-lite/blob/develop/src/static/js/Changeset.js[changeset
library]
provides tools to create, read, and apply changesets.
=== Changeset
[source,javascript]
----
const Changeset = require('ep_etherpad-lite/static/js/Changeset');
----
A changeset describes the difference between two revisions of a document. When a
user edits a pad, the browser generates and sends a changeset to the server,
which relays it to the other users and saves a copy (so that every past revision
is accessible).
A transmitted changeset looks like this:
[source]
----
'Z:z>1|2=m=b*0|1+1$\n'
----
=== Attribute Pool
[source,javascript]
----
const AttributePool = require('ep_etherpad-lite/static/js/AttributePool');
----
Changesets do not include any attribute keyvalue pairs. Instead, they use
numeric identifiers that reference attributes kept in an https://github.com/ether/etherpad-lite/blob/develop/src/static/js/AttributePool.js[attribute pool].
This attribute interning reduces the transmission overhead of attributes that
are used many times.
There is one attribute pool per pad, and it includes every current and
historical attribute used in the pad.
=== Further Reading
Detailed information about the changesets & Easysync protocol:
* https://github.com/ether/etherpad-lite/blob/develop/doc/easysync/easysync-notes.pdf[Easysync Protocol]
* https://github.com/ether/etherpad-lite/blob/develop/doc/easysync/easysync-full-description.pdf[Etherpad and EasySync Technical Manual]

View File

@ -1,151 +0,0 @@
# Changeset Library
```
"Z:z>1|2=m=b*0|1+1$\n"
```
This is a Changeset. It's just a string and it's very difficult to read in this form. But the Changeset Library gives us some tools to read it.
A changeset describes the diff between two revisions of the document. The Browser sends changesets to the server and the server sends them to the clients to update them. These Changesets also get saved into the history of a pad. This allows us to go back to every revision from the past.
## Changeset.unpack(changeset)
* `changeset` {String}
This function returns an object representation of the changeset, similar to this:
```
{ oldLen: 35, newLen: 36, ops: '|2=m=b*0|1+1', charBank: '\n' }
```
* `oldLen` {Number} the original length of the document.
* `newLen` {Number} the length of the document after the changeset is applied.
* `ops` {String} the actual changes, introduced by this changeset.
* `charBank` {String} All characters that are added by this changeset.
## Changeset.opIterator(ops)
* `ops` {String} The operators, returned by `Changeset.unpack()`
Returns an operator iterator. This iterator allows us to iterate over all operators that are in the changeset.
You can iterate with an opIterator using its `next()` and `hasNext()` methods. Next returns the `next()` operator object and `hasNext()` indicates, whether there are any operators left.
## The Operator object
There are 3 types of operators: `+`,`-` and `=`. These operators describe different changes to the document, beginning with the first character of the document. A `=` operator doesn't change the text, but it may add or remove text attributes. A `-` operator removes text. And a `+` Operator adds text and optionally adds some attributes to it.
* `opcode` {String} the operator type
* `chars` {Number} the length of the text changed by this operator.
* `lines` {Number} the number of lines changed by this operator.
* `attribs` {attribs} attributes set on this text.
### Example
```
{ opcode: '+',
chars: 1,
lines: 1,
attribs: '*0' }
```
## APool
```
> var AttributePoolFactory = require("./utils/AttributePoolFactory");
> var apool = AttributePoolFactory.createAttributePool();
> console.log(apool)
{ numToAttrib: {},
attribToNum: {},
nextNum: 0,
putAttrib: [Function],
getAttrib: [Function],
getAttribKey: [Function],
getAttribValue: [Function],
eachAttrib: [Function],
toJsonable: [Function],
fromJsonable: [Function] }
```
This creates an empty apool. An apool saves which attributes were used during the history of a pad. There is one apool for each pad. It only saves the attributes that were really used, it doesn't save unused attributes. Let's fill this apool with some values
```
> apool.fromJsonable({"numToAttrib":{"0":["author","a.kVnWeomPADAT2pn9"],"1":["bold","true"],"2":["italic","true"]},"nextNum":3});
> console.log(apool)
{ numToAttrib:
{ '0': [ 'author', 'a.kVnWeomPADAT2pn9' ],
'1': [ 'bold', 'true' ],
'2': [ 'italic', 'true' ] },
attribToNum:
{ 'author,a.kVnWeomPADAT2pn9': 0,
'bold,true': 1,
'italic,true': 2 },
nextNum: 3,
putAttrib: [Function],
getAttrib: [Function],
getAttribKey: [Function],
getAttribValue: [Function],
eachAttrib: [Function],
toJsonable: [Function],
fromJsonable: [Function] }
```
We used the fromJsonable function to fill the empty apool with values. the fromJsonable and toJsonable functions are used to serialize and deserialize an apool. You can see that it stores the relation between numbers and attributes. So for example the attribute 1 is the attribute bold and vise versa. An attribute is always a key value pair. For stuff like bold and italic it's just 'italic':'true'. For authors it's author:$AUTHORID. So a character can be bold and italic. But it can't belong to multiple authors
```
> apool.getAttrib(1)
[ 'bold', 'true' ]
```
Simple example of how to get the key value pair for the attribute 1
## AText
```
> var atext = {"text":"bold text\nitalic text\nnormal text\n\n","attribs":"*0*1+9*0|1+1*0*1*2+b|1+1*0+b|2+2"};
> console.log(atext)
{ text: 'bold text\nitalic text\nnormal text\n\n',
attribs: '*0*1+9*0|1+1*0*1*2+b|1+1*0+b|2+2' }
```
This is an atext. An atext has two parts: text and attribs. The text is just the text of the pad as a string. We will look closer at the attribs at the next steps
```
> var opiterator = Changeset.opIterator(atext.attribs)
> console.log(opiterator)
{ next: [Function: next],
hasNext: [Function: hasNext],
lastIndex: [Function: lastIndex] }
> opiterator.next()
{ opcode: '+',
chars: 9,
lines: 0,
attribs: '*0*1' }
> opiterator.next()
{ opcode: '+',
chars: 1,
lines: 1,
attribs: '*0' }
> opiterator.next()
{ opcode: '+',
chars: 11,
lines: 0,
attribs: '*0*1*2' }
> opiterator.next()
{ opcode: '+',
chars: 1,
lines: 1,
attribs: '' }
> opiterator.next()
{ opcode: '+',
chars: 11,
lines: 0,
attribs: '*0' }
> opiterator.next()
{ opcode: '+',
chars: 2,
lines: 2,
attribs: '' }
```
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
For more information see /doc/easysync/easysync-notes.txt in the source.

View File

@ -1,28 +1,30 @@
# Editbar
== Editbar
src/static/js/pad_editbar.js
## isEnabled()
=== isEnabled()
## disable()
=== disable()
## toggleDropDown(dropdown, callback)
=== toggleDropDown(dropdown)
Shows the dropdown `div.popup` whose `id` equals `dropdown`.
## registerCommand(cmd, callback)
=== registerCommand(cmd, callback)
Register a handler for a specific command. Commands are fired if the corresponding button is clicked or the corresponding select is changed.
## registerAceCommand(cmd, callback)
=== registerAceCommand(cmd, callback)
Creates an ace callstack and calls the callback with an ace instance (and a toolbar item, if applicable): `callback(cmd, ace, item)`.
Example:
```
[source, javascript]
----
toolbar.registerAceCommand("insertorderedlist", function (cmd, ace) {
ace.ace_doInsertOrderedList();
});
```
----
## registerDropdownCommand(cmd, dropdown)
=== registerDropdownCommand(cmd, dropdown)
Ties a `div.popup` where `id` equals `dropdown` to a `command` fired by clicking a button.
## triggerCommand(cmd[, item])
=== triggerCommand(cmd[, item])
Triggers a command (optionally with some internal representation of the toolbar item that triggered it).

125
doc/api/editorInfo.adoc Normal file
View File

@ -0,0 +1,125 @@
== editorInfo
=== editorInfo.ace_replaceRange(start, end, text)
This function replaces a range (from `start` to `end`) with `text`.
=== editorInfo.ace_getRep()
Returns the `rep` object.
=== editorInfo.ace_getAuthor()
=== editorInfo.ace_inCallStack()
=== editorInfo.ace_inCallStackIfNecessary(?)
=== editorInfo.ace_focus(?)
=== editorInfo.ace_importText(?)
=== editorInfo.ace_importAText(?)
=== editorInfo.ace_exportText(?)
=== editorInfo.ace_editorChangedSize(?)
=== editorInfo.ace_setOnKeyPress(?)
=== editorInfo.ace_setOnKeyDown(?)
=== editorInfo.ace_setNotifyDirty(?)
=== editorInfo.ace_dispose(?)
=== editorInfo.ace_setEditable(bool)
=== editorInfo.ace_execCommand(?)
=== editorInfo.ace_callWithAce(fn, callStack, normalize)
=== editorInfo.ace_setProperty(key, value)
=== editorInfo.ace_setBaseText(txt)
=== editorInfo.ace_setBaseAttributedText(atxt, apoolJsonObj)
=== editorInfo.ace_applyChangesToBase(c, optAuthor, apoolJsonObj)
=== editorInfo.ace_prepareUserChangeset()
=== editorInfo.ace_applyPreparedChangesetToBase()
=== editorInfo.ace_setUserChangeNotificationCallback(f)
=== editorInfo.ace_setAuthorInfo(author, info)
=== editorInfo.ace_fastIncorp(?)
=== editorInfo.ace_isCaret(?)
=== editorInfo.ace_getLineAndCharForPoint(?)
=== editorInfo.ace_performDocumentApplyAttributesToCharRange(?)
=== editorInfo.ace_setAttributeOnSelection(attribute, enabled)
Sets an attribute on current range.
Example: `call.editorInfo.ace_setAttributeOnSelection("turkey::balls", true); // turkey is the attribute here, balls is the value
Notes: to remove the attribute pass enabled as false
=== editorInfo.ace_toggleAttributeOnSelection(?)
=== editorInfo.ace_getAttributeOnSelection(attribute, prevChar)
Returns a boolean if an attribute exists on a selected range.
prevChar value should be true if you want to get the previous Character attribute instead of the current selection for example
if the caret is at position 0,1 (after first character) it's probable you want the attributes on the character at 0,0
The attribute should be the string name of the attribute applied to the selection IE subscript
Example usage: Apply the activeButton Class to a button if an attribute is on a highlighted/selected caret position or range.
Example `var isItThere = documentAttributeManager.getAttributeOnSelection("turkey::balls", true);`
See the ep_subscript plugin for an example of this function in action.
Notes: Does not work on first or last character of a line. Suffers from a race condition if called with aceEditEvent.
=== editorInfo.ace_performSelectionChange(?)
=== editorInfo.ace_doIndentOutdent(?)
=== editorInfo.ace_doUndoRedo(?)
=== editorInfo.ace_doInsertUnorderedList(?)
=== editorInfo.ace_doInsertOrderedList(?)
=== editorInfo.ace_performDocumentApplyAttributesToRange()
=== editorInfo.ace_getAuthorInfos()
Returns an info object about the author. Object key = author_id and info includes author's bg color value.
Use to define your own authorship.
=== editorInfo.ace_performDocumentReplaceRange(start, end, newText)
This function replaces a range (from [x1,y1] to [x2,y2]) with `newText`.
=== editorInfo.ace_performDocumentReplaceCharRange(startChar, endChar, newText)
This function replaces a range (from y1 to y2) with `newText`.
=== editorInfo.ace_renumberList(lineNum)
If you delete a line, calling this method will fix the line numbering.
=== editorInfo.ace_doReturnKey()
Forces a return key at the current caret position.
=== editorInfo.ace_isBlockElement(element)
Returns true if your passed element is registered as a block element
=== editorInfo.ace_getLineListType(lineNum)
Returns the line's html list type.
=== editorInfo.ace_caretLine()
Returns X position of the caret.
=== editorInfo.ace_caretColumn()
Returns Y position of the caret.
=== editorInfo.ace_caretDocChar()
Returns the Y offset starting from [x=0,y=0]
=== editorInfo.ace_isWordChar(?)

View File

@ -1,83 +0,0 @@
# editorInfo
## editorInfo.ace_replaceRange(start, end, text)
This function replaces a range (from `start` to `end`) with `text`.
## editorInfo.ace_getRep()
Returns the `rep` object.
## editorInfo.ace_getAuthor()
## editorInfo.ace_inCallStack()
## editorInfo.ace_inCallStackIfNecessary(?)
## editorInfo.ace_focus(?)
## editorInfo.ace_importText(?)
## editorInfo.ace_importAText(?)
## editorInfo.ace_exportText(?)
## editorInfo.ace_editorChangedSize(?)
## editorInfo.ace_setOnKeyPress(?)
## editorInfo.ace_setOnKeyDown(?)
## editorInfo.ace_setNotifyDirty(?)
## editorInfo.ace_dispose(?)
## editorInfo.ace_getFormattedCode(?)
## editorInfo.ace_setEditable(bool)
## editorInfo.ace_execCommand(?)
## editorInfo.ace_callWithAce(fn, callStack, normalize)
## editorInfo.ace_setProperty(key, value)
## editorInfo.ace_setBaseText(txt)
## editorInfo.ace_setBaseAttributedText(atxt, apoolJsonObj)
## editorInfo.ace_applyChangesToBase(c, optAuthor, apoolJsonObj)
## editorInfo.ace_prepareUserChangeset()
## editorInfo.ace_applyPreparedChangesetToBase()
## editorInfo.ace_setUserChangeNotificationCallback(f)
## editorInfo.ace_setAuthorInfo(author, info)
## editorInfo.ace_setAuthorSelectionRange(author, start, end)
## editorInfo.ace_getUnhandledErrors()
## editorInfo.ace_getDebugProperty(prop)
## editorInfo.ace_fastIncorp(?)
## editorInfo.ace_isCaret(?)
## editorInfo.ace_getLineAndCharForPoint(?)
## editorInfo.ace_performDocumentApplyAttributesToCharRange(?)
## editorInfo.ace_setAttributeOnSelection(attribute, enabled)
Sets an attribute on current range.
Example: `call.editorInfo.ace_setAttributeOnSelection("turkey::balls", true); // turkey is the attribute here, balls is the value
Notes: to remove the attribute pass enabled as false
## editorInfo.ace_toggleAttributeOnSelection(?)
## editorInfo.ace_getAttributeOnSelection(attribute, prevChar)
Returns a boolean if an attribute exists on a selected range.
prevChar value should be true if you want to get the previous Character attribute instead of the current selection for example
if the caret is at position 0,1 (after first character) it's probable you want the attributes on the character at 0,0
The attribute should be the string name of the attribute applied to the selection IE subscript
Example usage: Apply the activeButton Class to a button if an attribute is on a highlighted/selected caret position or range.
Example `var isItThere = documentAttributeManager.getAttributeOnSelection("turkey::balls", true);`
See the ep_subscript plugin for an example of this function in action.
Notes: Does not work on first or last character of a line. Suffers from a race condition if called with aceEditEvent.
## editorInfo.ace_performSelectionChange(?)
## editorInfo.ace_doIndentOutdent(?)
## editorInfo.ace_doUndoRedo(?)
## editorInfo.ace_doInsertUnorderedList(?)
## editorInfo.ace_doInsertOrderedList(?)
## editorInfo.ace_performDocumentApplyAttributesToRange()
## editorInfo.ace_getAuthorInfos()
Returns an info object about the author. Object key = author_id and info includes author's bg color value.
Use to define your own authorship.
## editorInfo.ace_performDocumentReplaceRange(start, end, newText)
This function replaces a range (from [x1,y1] to [x2,y2]) with `newText`.
## editorInfo.ace_performDocumentReplaceCharRange(startChar, endChar, newText)
This function replaces a range (from y1 to y2) with `newText`.
## editorInfo.ace_renumberList(lineNum)
If you delete a line, calling this method will fix the line numbering.
## editorInfo.ace_doReturnKey()
Forces a return key at the current caret position.
## editorInfo.ace_isBlockElement(element)
Returns true if your passed element is registered as a block element
## editorInfo.ace_getLineListType(lineNum)
Returns the line's html list type.
## editorInfo.ace_caretLine()
Returns X position of the caret.
## editorInfo.ace_caretColumn()
Returns Y position of the caret.
## editorInfo.ace_caretDocChar()
Returns the Y offset starting from [x=0,y=0]
## editorInfo.ace_isWordChar(?)

View File

@ -1,68 +1,76 @@
# Embed parameters
== Embed parameters
You can easily embed your etherpad-lite into any webpage by using iframes. You can configure the embedded pad using embed parameters.
Example:
Cut and paste the following code into any webpage to embed a pad. The parameters below will hide the chat and the line numbers.
Cut and paste the following code into any webpage to embed a pad. The parameters below will hide the chat and the line numbers and will auto-focus on Line 4.
```
<iframe src='http://pad.test.de/p/PAD_NAME?showChat=false&showLineNumbers=false' width=600 height=400></iframe>
```
[source, html]
----
<iframe src='http://pad.test.de/p/PAD_NAME#L4?showChat=false&showLineNumbers=false' width=600 height=400></iframe>
----
## showLineNumbers
=== showLineNumbers
* Boolean
Default: true
## showControls
=== showControls
* Boolean
Default: true
## showChat
=== showChat
* Boolean
Default: true
## useMonospaceFont
=== useMonospaceFont
* Boolean
Default: false
## userName
=== userName
* String
Default: "unnamed"
Example: `userName=Etherpad%20User`
## userColor
=== userColor
* String (css hex color value)
Default: randomly chosen by pad server
Example: `userColor=%23ff9900`
## noColors
=== noColors
* Boolean
Default: false
## alwaysShowChat
=== alwaysShowChat
* Boolean
Default: false
## lang
=== lang
* String
Default: en
Example: `lang=ar` (translates the interface into Arabic)
## rtl
=== rtl
* Boolean
Default: true
Displays pad text from right to left.
=== #L
* Int
Default: 0
Focuses pad at specific line number and places caret at beginning of this line
Special note: Is not a URL parameter but instead of a Hash value

View File

@ -1,7 +1,9 @@
# Client-side hooks
Most of these hooks are called during or in order to set up the formatting process.
== Client-side hooks
## documentReady
Most of these hooks are called during or in order to set up the formatting
process.
=== documentReady
Called from: src/templates/pad.html
Things in context:
@ -10,7 +12,8 @@ nothing
This hook proxies the functionality of jQuery's `$(document).ready` event.
## aceDomLinePreProcessLineAttributes
=== aceDomLinePreProcessLineAttributes
Called from: src/static/js/domline.js
Things in context:
@ -18,15 +21,21 @@ Things in context:
1. domline - The current DOM line being processed
2. cls - The class of the current block element (useful for styling)
This hook is called for elements in the DOM that have the "lineMarkerAttribute" set. You can add elements into this category with the aceRegisterBlockElements hook above. This hook is run BEFORE the numbered and ordered lists logic is applied.
This hook is called for elements in the DOM that have the "lineMarkerAttribute"
set. You can add elements into this category with the aceRegisterBlockElements
hook above. This hook is run BEFORE the numbered and ordered lists logic is
applied.
The return value of this hook should have the following structure:
`{ preHtml: String, postHtml: String, processedMarker: Boolean }`
The preHtml and postHtml values will be added to the HTML display of the element, and if processedMarker is true, the engine won't try to process it any more.
The preHtml and postHtml values will be added to the HTML display of the
element, and if processedMarker is true, the engine won't try to process it any
more.
=== aceDomLineProcessLineAttributes
## aceDomLineProcessLineAttributes
Called from: src/static/js/domline.js
Things in context:
@ -34,15 +43,21 @@ Things in context:
1. domline - The current DOM line being processed
2. cls - The class of the current block element (useful for styling)
This hook is called for elements in the DOM that have the "lineMarkerAttribute" set. You can add elements into this category with the aceRegisterBlockElements hook above. This hook is run AFTER the ordered and numbered lists logic is applied.
This hook is called for elements in the DOM that have the "lineMarkerAttribute"
set. You can add elements into this category with the aceRegisterBlockElements
hook above. This hook is run AFTER the ordered and numbered lists logic is
applied.
The return value of this hook should have the following structure:
`{ preHtml: String, postHtml: String, processedMarker: Boolean }`
The preHtml and postHtml values will be added to the HTML display of the element, and if processedMarker is true, the engine won't try to process it any more.
The preHtml and postHtml values will be added to the HTML display of the
element, and if processedMarker is true, the engine won't try to process it any
more.
=== aceCreateDomLine
## aceCreateDomLine
Called from: src/static/js/domline.js
Things in context:
@ -50,79 +65,106 @@ Things in context:
1. domline - the current DOM line being processed
2. cls - The class of the current element (useful for styling)
This hook is called for any line being processed by the formatting engine, unless the aceDomLineProcessLineAttributes hook from above returned true, in which case this hook is skipped.
This hook is called for any line being processed by the formatting engine,
unless the aceDomLineProcessLineAttributes hook from above returned true, in
which case this hook is skipped.
The return value of this hook should have the following structure:
`{ extraOpenTags: String, extraCloseTags: String, cls: String }`
extraOpenTags and extraCloseTags will be added before and after the element in question, and cls will be the new class of the element going forward.
extraOpenTags and extraCloseTags will be added before and after the element in
question, and cls will be the new class of the element going forward.
=== acePostWriteDomLineHTML
## acePostWriteDomLineHTML
Called from: src/static/js/domline.js
Things in context:
1. node - the DOM node that just got written to the page
This hook is for right after a node has been fully formatted and written to the page.
This hook is for right after a node has been fully formatted and written to the
page.
=== aceAttribsToClasses
## aceAttribsToClasses
Called from: src/static/js/linestylefilter.js
Things in context:
1. linestylefilter - the JavaScript object that's currently processing the ace attributes
1. linestylefilter - the JavaScript object that's currently processing the ace
attributes
2. key - the current attribute being processed
3. value - the value of the attribute being processed
This hook is called during the attribute processing procedure, and should be used to translate key, value pairs into valid HTML classes that can be inserted into the DOM.
This hook is called during the attribute processing procedure, and should be
used to translate key, value pairs into valid HTML classes that can be inserted
into the DOM.
The return value for this function should be a list of classes, which will then be parsed into a valid class string.
The return value for this function should be a list of classes, which will then
be parsed into a valid class string.
=== aceAttribClasses
## aceAttribClasses
Called from: src/static/js/linestylefilter.js
Things in context:
1. Attributes - Object of Attributes
This hook is called when attributes are investigated on a line. It is useful if you want to add another attribute type or property type to a pad.
This hook is called when attributes are investigated on a line. It is useful if
you want to add another attribute type or property type to a pad.
Example:
```
[source,javascript]
----
exports.aceAttribClasses = function(hook_name, attr, cb){
attr.sub = 'tag:sub';
cb(attr);
}
```
----
=== aceGetFilterStack
## aceGetFilterStack
Called from: src/static/js/linestylefilter.js
Things in context:
1. linestylefilter - the JavaScript object that's currently processing the ace attributes
1. linestylefilter - the JavaScript object that's currently processing the ace
attributes
2. browser - an object indicating which browser is accessing the page
This hook is called to apply custom regular expression filters to a set of styles. The one example available is the ep_linkify plugin, which adds internal links. They use it to find the telltale `[[ ]]` syntax that signifies internal links, and finding that syntax, they add in the internalHref attribute to be later used by the aceCreateDomLine hook (documented above).
This hook is called to apply custom regular expression filters to a set of
styles. The one example available is the ep_linkify plugin, which adds internal
links. They use it to find the telltale `[[ ]]` syntax that signifies internal
links, and finding that syntax, they add in the internalHref attribute to be
later used by the aceCreateDomLine hook (documented above).
=== aceEditorCSS
## aceEditorCSS
Called from: src/static/js/ace.js
Things in context: None
This hook is provided to allow custom CSS files to be loaded. The return value should be an array of resource urls or paths relative to the plugins directory.
This hook is provided to allow custom CSS files to be loaded. The return value
should be an array of resource urls or paths relative to the plugins directory.
=== aceInitInnerdocbodyHead
## aceInitInnerdocbodyHead
Called from: src/static/js/ace.js
Things in context:
1. iframeHTML - the HTML of the editor iframe up to this point, in array format
This hook is called during the creation of the editor HTML. The array should have lines of HTML added to it, giving the plugin author a chance to add in meta, script, link, and other tags that go into the `<head>` element of the editor HTML document.
This hook is called during the creation of the editor HTML. The array should
have lines of HTML added to it, giving the plugin author a chance to add in
meta, script, link, and other tags that go into the `<head>` element of the
editor HTML document.
=== aceEditEvent
## aceEditEvent
Called from: src/static/js/ace2_inner.js
Things in context:
@ -130,51 +172,74 @@ Things in context:
1. callstack - a bunch of information about the current action
2. editorInfo - information about the user who is making the change
3. rep - information about where the change is being made
4. documentAttributeManager - information about attributes in the document (this is a mystery to me)
4. documentAttributeManager - information about attributes in the document (this
is a mystery to me)
This hook is made available to edit the edit events that might occur when changes are made. Currently you can change the editor information, some of the meanings of the edit, and so on. You can also make internal changes (internal to your plugin) that use the information provided by the edit event.
This hook is made available to edit the edit events that might occur when
changes are made. Currently you can change the editor information, some of the
meanings of the edit, and so on. You can also make internal changes (internal to
your plugin) that use the information provided by the edit event.
=== aceRegisterNonScrollableEditEvents
## aceRegisterNonScrollableEditEvents
Called from: src/static/js/ace2_inner.js
Things in context: None
When aceEditEvent (documented above) finishes processing the event, it scrolls the viewport to make caret visible to the user, but if you don't want that behavior to happen you can use this hook to register which edit events should not scroll viewport. The return value of this hook should be a list of event names.
When aceEditEvent (documented above) finishes processing the event, it scrolls
the viewport to make caret visible to the user, but if you don't want that
behavior to happen you can use this hook to register which edit events should
not scroll viewport. The return value of this hook should be a list of event
names.
Example:
```
[source, javascript]
----
exports.aceRegisterNonScrollableEditEvents = function(){
return [ 'repaginate', 'updatePageCount' ];
}
```
----
=== aceRegisterBlockElements
## aceRegisterBlockElements
Called from: src/static/js/ace2_inner.js
Things in context: None
The return value of this hook will add elements into the "lineMarkerAttribute" category, making the aceDomLineProcessLineAttributes hook (documented below) call for those elements.
The return value of this hook will add elements into the "lineMarkerAttribute"
category, making the aceDomLineProcessLineAttributes hook (documented below)
call for those elements.
=== aceInitialized
## aceInitialized
Called from: src/static/js/ace2_inner.js
Things in context:
1. editorInfo - information about the user who will be making changes through the interface, and a way to insert functions into the main ace object (see ep_headings)
1. editorInfo - information about the user who will be making changes through
the interface, and a way to insert functions into the main ace object (see
ep_headings)
2. rep - information about where the user's cursor is
3. documentAttributeManager - some kind of magic
This hook is for inserting further information into the ace engine, for later use in formatting hooks.
This hook is for inserting further information into the ace engine, for later
use in formatting hooks.
=== postAceInit
## postAceInit
Called from: src/static/js/pad.js
Things in context:
1. ace - the ace object that is applied to this editor.
2. pad - the pad object of the current pad.
2. clientVars - Object containing client-side configuration such as author ID
and plugin settings. Your plugin can manipulate this object via the
`clientVars` server-side hook.
3. pad - the pad object of the current pad.
=== postToolbarInit
## postToolbarInit
Called from: src/static/js/pad_editbar.js
Things in context:
@ -186,48 +251,88 @@ Can be used to register custom actions to the toolbar.
Usage examples:
* [https://github.com/tiblu/ep_authorship_toggle]()
* https://github.com/tiblu/ep_authorship_toggle
=== postTimesliderInit
## postTimesliderInit
Called from: src/static/js/timeslider.js
There doesn't appear to be any example available of this particular hook being used, but it gets fired after the timeslider is all set up.
There doesn't appear to be any example available of this particular hook being
used, but it gets fired after the timeslider is all set up.
=== goToRevisionEvent
## goToRevisionEvent
Called from: src/static/js/broadcast.js
Things in context:
1. rev - The newRevision
This hook gets fired both on timeslider load (as timeslider shows a new revision) and when the new revision is showed to a user.
There doesn't appear to be any example available of this particular hook being used.
This hook gets fired both on timeslider load (as timeslider shows a new
revision) and when the new revision is showed to a user. There doesn't appear to
be any example available of this particular hook being used.
=== userJoinOrUpdate
## userJoinOrUpdate
Called from: src/static/js/pad_userlist.js
Things in context:
1. info - the user information
This hook is called on the client side whenever a user joins or changes. This can be used to create notifications or an alternate user list.
This hook is called on the client side whenever a user joins or changes. This
can be used to create notifications or an alternate user list.
## chatNewMessage
Called from: src/static/js/chat.js
=== chatNewMessage
Things in context:
Called from: `src/static/js/chat.js`
1. authorName - The user that wrote this message
2. author - The authorID of the user that wrote the message
3. text - the message text
4. sticky (boolean) - if you want the gritter notification bubble to fade out on its own or just sit there
5. timestamp - the timestamp of the chat message
6. timeStr - the timestamp as a formatted string
7. duration - for how long in milliseconds should the gritter notification appear (0 to disable)
This hook runs on the client side whenever a chat message is received from the
server. It can be used to create different notifications for chat messages. Hook
functions can modify the `author`, `authorName`, `duration`, `rendered`,
`sticky`, `text`, and `timeStr` context properties to change how the message is
processed. The `text` and `timeStr` properties may contain HTML and come
pre-sanitized; plugins should be careful to sanitize any added user input to
avoid introducing an XSS vulnerability.
This hook is called on the client side whenever a chat message is received from the server. It can be used to create different notifications for chat messages.
Context properties:
* `authorName`: The display name of the user that wrote the message.
* `author`: The author ID of the user that wrote the message.
* `text`: Sanitized message HTML, with URLs wrapped like `<a
href="url">url</a>`. (Note that `message.text` is not sanitized or processed
in any way.)
* `message`: The raw message object as received from the server, except with
time correction and a default `authorId` property if missing. Plugins must not
modify this object. Warning: Unlike `text`, `message.text` is not
pre-sanitized or processed in any way.
* `rendered` - Used to override the default message rendering. Initially set to
`null`. If the hook function sets this to a DOM element object or a jQuery
object, then that object will be used as the rendered message UI. Otherwise,
if this is set to `null`, then Etherpad will render a default UI for the
message using the other context properties.
* `sticky` (boolean): Whether the gritter notification should fade out on its
own or just sit there until manually closed.
* `timestamp`: When the chat message was sent (milliseconds since epoch),
corrected using the difference between the local clock and the server's clock.
* `timeStr`: The message timestamp as a formatted string.
* `duration`: How long (in milliseconds) to display the gritter notification (0
to disable).
=== chatSendMessage
Called from: `src/static/js/chat.js`
This hook runs on the client side whenever the user sends a new chat message.
Plugins can mutate the message object to change the message text or add metadata
to control how the message will be rendered by the `chatNewMessage` hook.
Context properties:
* `message`: The message object that will be sent to the Etherpad server.
=== collectContentPre
## collectContentPre
Called from: src/static/js/contentcollector.js
Things in context:
@ -238,16 +343,20 @@ Things in context:
4. styl - the style applied to the node (probably CSS) -- Note the typo
5. cls - the HTML class string of the node
This hook is called before the content of a node is collected by the usual methods. The cc object can be used to do a bunch of things that modify the content of the pad. See, for example, the heading1 plugin for etherpad original.
This hook is called before the content of a node is collected by the usual
methods. The cc object can be used to do a bunch of things that modify the
content of the pad. See, for example, the heading1 plugin for etherpad original.
E.g. if you need to apply an attribute to newly inserted characters,
call cc.doAttrib(state, "attributeName") which results in an attribute attributeName=true.
E.g. if you need to apply an attribute to newly inserted characters, call
cc.doAttrib(state, "attributeName") which results in an attribute
attributeName=true.
If you want to specify also a value, call cc.doAttrib(state, "attributeName::value")
which results in an attribute attributeName=value.
If you want to specify also a value, call cc.doAttrib(state,
"attributeName::value") which results in an attribute attributeName=value.
## collectContentImage
=== collectContentImage
Called from: src/static/js/contentcollector.js
Things in context:
@ -259,18 +368,22 @@ Things in context:
5. cls - the HTML class string of the node
6. node - the node being modified
This hook is called before the content of an image node is collected by the usual methods. The cc object can be used to do a bunch of things that modify the content of the pad.
This hook is called before the content of an image node is collected by the
usual methods. The cc object can be used to do a bunch of things that modify the
content of the pad.
Example:
```
[source, javascript]
----
exports.collectContentImage = function(name, context){
context.state.lineAttributes.img = context.node.outerHTML;
}
```
----
=== collectContentPost
## collectContentPost
Called from: src/static/js/contentcollector.js
Things in context:
@ -281,20 +394,29 @@ Things in context:
4. style - the style applied to the node (probably CSS)
5. cls - the HTML class string of the node
This hook is called after the content of a node is collected by the usual methods. The cc object can be used to do a bunch of things that modify the content of the pad. See, for example, the heading1 plugin for etherpad original.
This hook is called after the content of a node is collected by the usual
methods. The cc object can be used to do a bunch of things that modify the
content of the pad. See, for example, the heading1 plugin for etherpad original.
=== handleClientMessage_`name`
## handleClientMessage_`name`
Called from: `src/static/js/collab_client.js`
Things in context:
1. payload - the data that got sent with the message (use it for custom message content)
1. payload - the data that got sent with the message (use it for custom message
content)
This hook gets called every time the client receives a message of type `name`. This can most notably be used with the new HTTP API call, "sendClientsMessage", which sends a custom message type to all clients connected to a pad. You can also use this to handle existing types.
This hook gets called every time the client receives a message of type `name`.
This can most notably be used with the new HTTP API call, "sendClientsMessage",
which sends a custom message type to all clients connected to a pad. You can
also use this to handle existing types.
`collab_client.js` has a pretty extensive list of message types, if you want to take a look.
`collab_client.js` has a pretty extensive list of message types, if you want to
take a look.
=== aceStartLineAndCharForPoint-aceEndLineAndCharForPoint
##aceStartLineAndCharForPoint-aceEndLineAndCharForPoint
Called from: src/static/js/ace2_inner.js
Things in context:
@ -306,10 +428,11 @@ Things in context:
5. point - the starting/ending element where the cursor highlights
6. documentAttributeManager - information about attributes in the document
This hook is provided to allow a plugin to turn DOM node selection into [line,char] selection.
The return value should be an array of [line,char]
This hook is provided to allow a plugin to turn DOM node selection into
[line,char] selection. The return value should be an array of [line,char]
=== aceKeyEvent
##aceKeyEvent
Called from: src/static/js/ace2_inner.js
Things in context:
@ -323,7 +446,8 @@ Things in context:
This hook is provided to allow a plugin to handle key events.
The return value should be true if you have handled the event.
##collectContentLineText
=== collectContentLineText
Called from: src/static/js/contentcollector.js
Things in context:
@ -333,10 +457,25 @@ Things in context:
3. tname - the tag name of this node currently being processed
4. text - the text for that line
This hook allows you to validate/manipulate the text before it's sent to the server side.
The return value should be the validated/manipulated text.
This hook allows you to validate/manipulate the text before it's sent to the
server side. To change the text, either:
* Set the `text` context property to the desired value and return `undefined`.
* (Deprecated) Return a string. If a hook function changes the `text` context
property, the return value is ignored. If no hook function changes `text` but
multiple hook functions return a string, the first one wins.
Example:
[source,javascript]
----
exports.collectContentLineText = (hookName, context) => {
context.text = tweakText(context.text);
};
----
=== collectContentLineBreak
##collectContentLineBreak
Called from: src/static/js/contentcollector.js
Things in context:
@ -345,24 +484,27 @@ Things in context:
2. state - the current state of the change being made
3. tname - the tag name of this node currently being processed
This hook is provided to allow whether the br tag should induce a new magic domline or not.
The return value should be either true(break the line) or false.
This hook is provided to allow whether the br tag should induce a new magic
domline or not. The return value should be either true(break the line) or false.
=== disableAuthorColorsForThisLine
##disableAuthorColorsForThisLine
Called from: src/static/js/linestylefilter.js
Things in context:
1. linestylefilter - the JavaScript object that's currently processing the ace attributes
1. linestylefilter - the JavaScript object that's currently processing the ace
attributes
2. text - the line text
3. class - line class
This hook is provided to allow whether a given line should be deliniated with multiple authors.
Multiple authors in one line cause the creation of magic span lines. This might not suit you and
now you can disable it and handle your own deliniation.
The return value should be either true(disable) or false.
This hook is provided to allow whether a given line should be deliniated with
multiple authors. Multiple authors in one line cause the creation of magic span
lines. This might not suit you and now you can disable it and handle your own
deliniation. The return value should be either true(disable) or false.
=== aceSetAuthorStyle
## aceSetAuthorStyle
Called from: src/static/js/ace2_inner.js
Things in context:
@ -374,10 +516,12 @@ Things in context:
5. author - author info
6. authorSelector - css selector for author span in inner ace
This hook is provided to allow author highlight style to be modified.
Registered hooks should return 1 if the plugin handles highlighting. If no plugin returns 1, the core will use the default background-based highlighting.
This hook is provided to allow author highlight style to be modified. Registered
hooks should return 1 if the plugin handles highlighting. If no plugin returns
1, the core will use the default background-based highlighting.
=== aceSelectionChanged
## aceSelectionChanged
Called from: src/static/js/ace2_inner.js
Things in context:

116
doc/api/hooks_overview.adoc Normal file
View File

@ -0,0 +1,116 @@
== Hooks
A hook function is registered with a hook via the plugin's `ep.json` file. See
the Plugins section for details. A hook may have many registered functions from
different plugins.
Some hooks call their registered functions one at a time until one of them
returns a value. Others always call all of their registered functions and
combine the results (if applicable).
=== Registered hook functions
Note: The documentation in this section applies to every hook unless the
hook-specific documentation says otherwise.
==== Arguments
Hook functions are called with three arguments:
1. `hookName` - The name of the hook being invoked.
2. `context` - An object with some relevant information about the context of the
call. See the hook-specific documentation for details.
3. `cb` - For asynchronous operations this callback can be called to signal
completion and optionally provide a return value. The callback takes a single
argument, the meaning of which depends on the hook (see the "Return values"
section for general information that applies to most hooks). This callback
always returns `undefined`.
==== Expected behavior
The presence of a callback parameter suggests that every hook function can run
asynchronously. While that is the eventual goal, there are some legacy hooks
that expect their hook functions to provide a value synchronously. For such
hooks, the hook functions must do one of the following:
* Call the callback with a non-Promise value (`undefined` is acceptable) and
return `undefined`, in that order.
* Return a non-Promise value other than `undefined` (`null` is acceptable) and
never call the callback. Note that `async` functions *always* return a
Promise, so they must never be used for synchronous hooks.
* Only have two parameters (`hookName` and `context`) and return any non-Promise
value (`undefined` is acceptable).
For hooks that permit asynchronous behavior, the hook functions must do one or
more of the following:
* Return `undefined` and call the callback, in either order.
* Return something other than `undefined` (`null` is acceptable) and never call
the callback. Note that `async` functions *always* return a Promise, so they
must never call the callback.
* Only have two parameters (`hookName` and `context`).
Note that the acceptable behaviors for asynchronous hook functions is a superset
of the acceptable behaviors for synchronous hook functions.
WARNING: The number of parameters is determined by examining
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/length[Function.length],
which does not count https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters[default parameters]
or https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters["rest" parameters].
To avoid problems, do not use default or rest parameters when defining hook
functions.
==== Return values
A hook function can provide a value to Etherpad in one of the following ways:
* Pass the desired value as the first argument to the callback.
* Return the desired value directly. The value must not be `undefined` unless
the hook function only has two parameters. (Hook functions with three
parameters that want to provide `undefined` should instead use the callback.)
* For hooks that permit asynchronous behavior, return a Promise that resolves to
the desired value.
* For hooks that permit asynchronous behavior, pass a Promise that resolves to
the desired value as the first argument to the callback.
Examples:
[source,javascript]
----
exports.exampleOne = (hookName, context, callback) => {
return 'valueOne';
};
exports.exampleTwo = (hookName, context, callback) => {
callback('valueTwo');
return;
};
// ONLY FOR HOOKS THAT PERMIT ASYNCHRONOUS BEHAVIOR
exports.exampleThree = (hookName, context, callback) => {
return new Promise('valueThree');
};
// ONLY FOR HOOKS THAT PERMIT ASYNCHRONOUS BEHAVIOR
exports.exampleFour = (hookName, context, callback) => {
callback(new Promise('valueFour'));
return;
};
// ONLY FOR HOOKS THAT PERMIT ASYNCHRONOUS BEHAVIOR
exports.exampleFive = async (hookName, context) => {
// Note that this function is async, so it actually returns a Promise that
// is resolved to 'valueFive'.
return 'valueFive';
};
----
Etherpad collects the values provided by the hook functions into an array,
filters out all `undefined` values, then flattens the array one level.
Flattening one level makes it possible for a hook function to behave as if it
were multiple separate hook functions.
For example: Suppose a hook has eight registered functions that return the
following values: `1`, `[2]`, `['3a', '3b']` `[[4]]`, `undefined`,
`[undefined]`, `[]`, and `null`. The value returned to the caller of the hook is
`[1, 2, '3a', '3b', [4], undefined, null]`.

View File

@ -1,51 +0,0 @@
# Hooks
A hook function is registered with a hook via the plugin's `ep.json` file. See
the Plugins section for details. A hook may have many registered functions from
different plugins.
When a hook is invoked, its registered functions are called with three
arguments:
1. hookName - The name of the hook being invoked.
2. context - An object with some relevant information about the context of the
call. See the hook-specific documentation for details.
3. callback - Function to call when done. This callback takes a single argument,
the meaning of which depends on the hook. See the "Return values" section for
general information that applies to most hooks. The value returned by this
callback must be returned by the hook function unless otherwise specified.
## Return values
Note: This section applies to every hook unless the hook-specific documentation
says otherwise.
Hook functions return zero or more values to Etherpad by passing an array to the
provided callback. Hook functions typically provide a single value (array of
length one). If the function does not want to or need to provide a value, it may
pass an empty array or `undefined` (which is treated the same as an empty
array). Hook functions may also provide more than one value (array of length two
or more).
Some hooks concatenate the arrays provided by its registered functions. For
example, if a hook's registered functions pass `[1, 2]`, `undefined`, `[3, 4]`,
`[]`, and `[5]` to the provided callback, then the hook's return value is `[1,
2, 3, 4, 5]`.
Other hooks only use the first non-empty array provided by a registered
function. In this case, each of the hook's registered functions is called one at
a time until one provides a non-empty array. The remaining functions are
skipped. If none of the functions provide a non-empty array, or there are no
registered functions, the hook's return value is `[]`.
Example:
```
exports.abstractHook = (hookName, context, callback) => {
if (notApplicableToThisPlugin(context)) {
return callback();
}
const value = doSomeProcessing(context);
return callback([value]);
};
```

File diff suppressed because it is too large Load Diff

View File

@ -1,665 +0,0 @@
# Server-side hooks
These hooks are called on server-side.
## loadSettings
Called from: src/node/server.js
Things in context:
1. settings - the settings object
Use this hook to receive the global settings in your plugin.
## shutdown
Called from: src/node/server.js
Things in context: None
This hook runs before shutdown. Use it to stop timers, close sockets and files,
flush buffers, etc. The database is not available while this hook is running.
The shutdown function must not block for long because there is a short timeout
before the process is forcibly terminated.
The shutdown function must return a Promise, which must resolve to `undefined`.
Returning `callback(value)` will return a Promise that is resolved to `value`.
Example:
```
// using an async function
exports.shutdown = async (hookName, context) => {
await flushBuffers();
};
```
## pluginUninstall
Called from: src/static/js/pluginfw/installer.js
Things in context:
1. plugin_name - self-explanatory
If this hook returns an error, the callback to the uninstall function gets an error as well. This mostly seems useful for handling additional features added in based on the installation of other plugins, which is pretty cool!
## pluginInstall
Called from: src/static/js/pluginfw/installer.js
Things in context:
1. plugin_name - self-explanatory
If this hook returns an error, the callback to the install function gets an error, too. This seems useful for adding in features when a particular plugin is installed.
## init_`<plugin name>`
Called from: src/static/js/pluginfw/plugins.js
Things in context: None
This function is called after a specific plugin is initialized. This would probably be more useful than the previous two functions if you only wanted to add in features to one specific plugin.
## expressConfigure
Called from: src/node/hooks/express.js
Things in context:
1. app - the main application object
This is a helpful hook for changing the behavior and configuration of the application. It's called right after the application gets configured.
## expressCreateServer
Called from: src/node/hooks/express.js
Things in context:
1. app - the main express application object (helpful for adding new paths and such)
2. server - the http server object
This hook gets called after the application object has been created, but before it starts listening. This is similar to the expressConfigure hook, but it's not guaranteed that the application object will have all relevant configuration variables.
## eejsBlock_`<name>`
Called from: src/node/eejs/index.js
Things in context:
1. content - the content of the block
This hook gets called upon the rendering of an ejs template block. For any specific kind of block, you can change how that block gets rendered by modifying the content object passed in.
Available blocks in `pad.html` are:
* `htmlHead` - after `<html>` and immediately before the title tag
* `styles` - the style `<link>`s
* `body` - the contents of the body tag
* `editbarMenuLeft` - the left tool bar (consider using the toolbar controller instead of manually adding html here)
* `editbarMenuRight` - right tool bar
* `afterEditbar` - allows you to add stuff immediately after the toolbar
* `userlist` - the contents of the userlist dropdown
* `loading` - the initial loading message
* `mySettings` - the left column of the settings dropdown ("My view"); intended for adding checkboxes only
* `mySettings.dropdowns` - add your dropdown settings here
* `globalSettings` - the right column of the settings dropdown ("Global view")
* `importColumn` - import form
* `exportColumn` - export form
* `modals` - Contains all connectivity messages
* `embedPopup` - the embed dropdown
* `scripts` - Add your script tags here, if you really have to (consider use client-side hooks instead)
`timeslider.html` blocks:
* `timesliderStyles`
* `timesliderScripts`
* `timesliderBody`
* `timesliderTop`
* `timesliderEditbarRight`
* `modals`
`index.html` blocks:
* `indexCustomStyles` - contains the `index.css` `<link>` tag, allows you to add your own or to customize the one provided by the active skin
* `indexWrapper` - contains the form for creating new pads
* `indexCustomScripts` - contains the `index.js` `<script>` tag, allows you to add your own or to customize the one provided by the active skin
* `indexCustomInlineScripts` - contains the inline `<script>` of home page, allows you to customize `go2Name()`, `go2Random()` or `randomPadName()` functions
## padInitToolbar
Called from: src/node/hooks/express/specialpages.js
Things in context:
1. toolbar - the toolbar controller that will render the toolbar eventually
Here you can add custom toolbar items that will be available in the toolbar config in `settings.json`. For more about the toolbar controller see the API section.
Usage examples:
* https://github.com/tiblu/ep_authorship_toggle
## onAccessCheck
Called from: src/node/db/SecurityManager.js
Things in context:
1. padID - the pad the user wants to access
2. password - the password the user has given to access the pad
3. token - the token of the author
4. sessionCookie - the session the use has
This hook gets called when the access to the concrete pad is being checked. Return `false` to deny access.
## padCreate
Called from: src/node/db/Pad.js
Things in context:
1. pad - the pad instance
2. author - the id of the author who created the pad
This hook gets called when a new pad was created.
## padLoad
Called from: src/node/db/Pad.js
Things in context:
1. pad - the pad instance
This hook gets called when a pad was loaded. If a new pad was created and loaded this event will be emitted too.
## padUpdate
Called from: src/node/db/Pad.js
Things in context:
1. pad - the pad instance
2. author - the id of the author who updated the pad
This hook gets called when an existing pad was updated.
## padCopy
Called from: src/node/db/Pad.js
Things in context:
1. originalPad - the source pad instance
2. destinationID - the id of the pad copied from originalPad
This hook gets called when an existing pad was copied.
Usage examples:
* https://github.com/ether/ep_comments
## padRemove
Called from: src/node/db/Pad.js
Things in context:
1. padID
This hook gets called when an existing pad was removed/deleted.
Usage examples:
* https://github.com/ether/ep_comments
## socketio
Called from: src/node/hooks/express/socketio.js
Things in context:
1. app - the application object
2. io - the socketio object
3. server - the http server object
I have no idea what this is useful for, someone else will have to add this description.
## authorize
Called from: src/node/hooks/express/webaccess.js
Things in context:
1. req - the request object
2. res - the response object
3. next - ?
4. resource - the path being accessed
This hook is called to handle authorization. It is especially useful for
controlling access to specific paths.
A plugin's authorize function is typically called twice for each access: once
before authentication and again after. Specifically, it is called if all of the
following are true:
* The request is not for static content or an API endpoint. (Requests for static
content and API endpoints are always authorized, even if unauthenticated.)
* Either authentication has not yet been performed (`context.req.session.user`
is undefined) or the user has successfully authenticated
(`context.req.session.user` is an object containing user-specific settings).
* If the user has successfully authenticated, the user is not an admin. (Admin
users are always authorized.)
* Either the request is for an `/admin` page or the `requireAuthentication`
setting is true.
* Either the request is for an `/admin` page, or the user has not yet
authenticated, or the user has authenticated and the `requireAuthorization`
setting is true.
* For pre-authentication invocations of a plugin's authorize function
(`context.req.session.user` is undefined), an authorize function from a
different plugin has not already caused the pre-authentication authorization
to pass or fail.
* For post-authentication invocations of a plugin's authorize function
(`context.req.session.user` is an object), an authorize function from a
different plugin has not already caused the post-authentication authorization
to pass or fail.
For pre-authentication invocations of your authorize function, you can pass the
following values to the provided callback:
* `[true]` or `['create']` will immediately grant access without requiring the
user to authenticate.
* `[false]` will trigger authentication unless authentication is not required.
* `[]` or `undefined` will defer the decision to the next authorization plugin
(if any, otherwise it is the same as calling with `[false]`).
**WARNING:** Your authorize function can be called for an `/admin` page even if
the user has not yet authenticated. It is your responsibility to fail or defer
authorization if you do not want to grant admin privileges to the general
public.
For post-authentication invocations of your authorize function, you can pass the
following values to the provided callback:
* `[true]` or `['create']` will grant access.
* `[false]` will deny access.
* `[]` or `undefined` will defer the authorization decision to the next
authorization plugin (if any, otherwise deny).
Example:
```
exports.authorize = (hookName, context, cb) => {
const user = context.req.session.user;
if (!user) {
// The user has not yet authenticated so defer the pre-authentication
// authorization decision to the next plugin.
return cb([]);
}
const path = context.req.path; // or context.resource
if (isExplicitlyProhibited(user, path)) return cb([false]);
if (isExplicitlyAllowed(user, path)) return cb([true]);
return cb([]); // Let the next authorization plugin decide
};
```
## authenticate
Called from: src/node/hooks/express/webaccess.js
Things in context:
1. req - the request object
2. res - the response object
3. users - the users object from settings.json (possibly modified by plugins)
4. next - ?
5. username - the username used (optional)
6. password - the password used (optional)
This hook is called to handle authentication.
Plugins that supply an authenticate function should probably also supply an
authFailure function unless falling back to HTTP basic authentication is
appropriate upon authentication failure.
This hook is only called if either the `requireAuthentication` setting is true
or the request is for an `/admin` page.
Calling the provided callback with `[true]` or `[false]` will cause
authentication to succeed or fail, respectively. Calling the callback with `[]`
or `undefined` will defer the authentication decision to the next authentication
plugin (if any, otherwise fall back to HTTP basic authentication).
If you wish to provide a mix of restricted and anonymous access (e.g., some pads
are private, others are public), you can "authenticate" (as a guest account)
users that have not yet logged in, and rely on other hooks (e.g., authorize,
onAccessCheck, handleMessageSecurity) to authorize specific privileged actions.
If authentication is successful, the authenticate function MUST set
`context.req.session.user` to the user's settings object. The `username`
property of this object should be set to the user's username. The settings
object should come from global settings (`context.users[username]`).
Example:
```
exports.authenticate = (hook_name, context, cb) => {
if (notApplicableToThisPlugin(context)) {
return cb([]); // Let the next authentication plugin decide
}
const username = authenticate(context);
if (!username) {
console.warn(`ep_myplugin.authenticate: Failed authentication from IP ${context.req.ip}`);
return cb([false]);
}
console.info(`ep_myplugin.authenticate: Successful authentication from IP ${context.req.ip} for user ${username}`);
const users = context.users;
if (!(username in users)) users[username] = {};
users[username].username = username;
context.req.session.user = users[username];
return cb([true]);
};
```
## authFailure
Called from: src/node/hooks/express/webaccess.js
Things in context:
1. req - the request object
2. res - the response object
3. next - ?
This hook is called to handle an authentication or authorization failure.
Plugins that supply an authenticate function should probably also supply an
authFailure function unless falling back to HTTP basic authentication is
appropriate upon authentication failure.
A plugin's authFailure function is only called if all of the following are true:
* There was an authentication or authorization failure.
* The failure was not already handled by an authFailure function from another
plugin.
Calling the provided callback with `[true]` tells Etherpad that the failure was
handled and no further error handling is required. Calling the callback with
`[]` or `undefined` defers error handling to the next authFailure plugin (if
any, otherwise fall back to HTTP basic authentication).
Example:
```
exports.authFailure = (hookName, context, cb) => {
if (notApplicableToThisPlugin(context)) {
return cb([]); // Let the next plugin handle the error
}
context.res.redirect(makeLoginURL(context.req));
return cb([true]);
};
```
## handleMessage
Called from: src/node/handler/PadMessageHandler.js
Things in context:
1. message - the message being handled
2. client - the socket.io Socket object
This hook allows plugins to drop or modify incoming socket.io messages from
clients, before Etherpad processes them.
The handleMessage function must return a Promise. If the Promise resolves to
`null`, the message is dropped. Returning `callback(value)` will return a
Promise that is resolved to `value`.
**WARNING:** handleMessage is called for every message, even if the client is
not authorized to send the message. It is up to the plugin to check permissions.
Examples:
```
// Using an async function:
exports.handleMessage = async (hookName, {message, client}) => {
if (message.type === 'USERINFO_UPDATE') {
// Force the display name to the name associated with the account.
const user = client.client.request.session.user || {};
if (user.name) message.data.userInfo.name = user.name;
}
};
// Using a regular function:
exports.handleMessage = (hookName, {message, client}, callback) => {
if (message.type === 'USERINFO_UPDATE') {
// Force the display name to the name associated with the account.
const user = client.client.request.session.user || {};
if (user.name) message.data.userInfo.name = user.name;
}
return cb();
};
```
## handleMessageSecurity
Called from: src/node/handler/PadMessageHandler.js
Things in context:
1. message - the message being handled
2. client - the socket.io Socket object
This hook allows plugins to grant temporary write access to a pad. It is called
for each incoming message from a client. If write access is granted, it applies
to the current message and all future messages from the same socket.io
connection until the next `CLIENT_READY` or `SWITCH_TO_PAD` message. Read-only
access is reset **after** each `CLIENT_READY` or `SWITCH_TO_PAD` message, so
granting write access has no effect for those message types.
The handleMessageSecurity function must return a Promise. If the Promise
resolves to `true`, write access is granted as described above. Returning
`callback(value)` will return a Promise that is resolved to `value`.
**WARNING:** handleMessageSecurity is called for every message, even if the
client is not authorized to send the message. It is up to the plugin to check
permissions.
Examples:
```
// Using an async function:
exports.handleMessageSecurity = async (hookName, {message, client}) => {
if (shouldGrantWriteAccess(message, client)) return true;
return;
};
// Using a regular function:
exports.handleMessageSecurity = (hookName, {message, client}, callback) => {
if (shouldGrantWriteAccess(message, client)) return callback(true);
return callback();
};
```
## clientVars
Called from: src/node/handler/PadMessageHandler.js
Things in context:
1. clientVars - the basic `clientVars` built by the core
2. pad - the pad this session is about
3. socket - the socket.io Socket object
This hook is called after a client connects but before the initial configuration
is sent to the client. Plugins can use this hook to manipulate the
configuration. (Example: Add a tracking ID for an external analytics tool that
is used client-side.)
The clientVars function must return a Promise that resolves to an object (or
null/undefined) whose properties will be merged into `context.clientVars`.
Returning `callback(value)` will return a Promise that is resolved to `value`.
You can modify `context.clientVars` to change the values sent to the client, but
beware: async functions from other clientVars plugins might also be reading or
manipulating the same `context.clientVars` object. For this reason it is
recommended you return an object rather than modify `context.clientVars`.
If needed, you can access the user's account information (if authenticated) via
`context.socket.client.request.session.user`.
Examples:
```
// Using an async function
exports.clientVars = async (hookName, context) => {
const user = context.socket.client.request.session.user || {};
return {'accountUsername': user.username || '<unknown>'}
};
// Using a regular function
exports.clientVars = (hookName, context, callback) => {
const user = context.socket.client.request.session.user || {};
return callback({'accountUsername': user.username || '<unknown>'});
};
```
This can be accessed on the client-side using `clientVars.currentYear`.
## getLineHTMLForExport
Called from: src/node/utils/ExportHtml.js
Things in context:
1. apool - pool object
2. attribLine - line attributes
3. text - line text
This hook will allow a plug-in developer to re-write each line when exporting to HTML.
Example:
```
var Changeset = require("ep_etherpad-lite/static/js/Changeset");
exports.getLineHTMLForExport = function (hook, context) {
var header = _analyzeLine(context.attribLine, context.apool);
if (header) {
return "<" + header + ">" + context.lineContent + "</" + header + ">";
}
}
function _analyzeLine(alineAttrs, apool) {
var header = null;
if (alineAttrs) {
var opIter = Changeset.opIterator(alineAttrs);
if (opIter.hasNext()) {
var op = opIter.next();
header = Changeset.opAttributeValue(op, 'heading', apool);
}
}
return header;
}
```
## stylesForExport
Called from: src/node/utils/ExportHtml.js
Things in context:
1. padId - The Pad Id
This hook will allow a plug-in developer to append Styles to the Exported HTML.
Example:
```
exports.stylesForExport = function(hook, padId, cb){
cb("body{font-size:13.37em !important}");
}
```
## aceAttribClasses
Called from: src/static/js/linestylefilter.js
Things in context:
1. Attributes - Object of Attributes
This hook is called when attributes are investigated on a line. It is useful if you want to add another attribute type or property type to a pad.
Example:
```
exports.aceAttribClasses = function(hook_name, attr, cb){
attr.sub = 'tag:sub';
cb(attr);
}
```
## exportFileName
Called from src/node/handler/ExportHandler.js
Things in context:
1. padId
This hook will allow a plug-in developer to modify the file name of an exported pad. This is useful if you want to export a pad under another name and/or hide the padId under export. Note that the doctype or file extension cannot be modified for security reasons.
Example:
```
exports.exportFileName = function(hook, padId, callback){
callback("newFileName"+padId);
}
```
## exportHtmlAdditionalTags
Called from src/node/utils/ExportHtml.js
Things in context:
1. Pad object
This hook will allow a plug-in developer to include more properties and attributes to support during HTML Export. If tags are stored as `['color', 'red']` on the attribute pool, use `exportHtmlAdditionalTagsWithData` instead. An Array should be returned.
Example:
```
// Add the props to be supported in export
exports.exportHtmlAdditionalTags = function(hook, pad, cb){
var padId = pad.id;
cb(["massive","jugs"]);
};
```
## exportHtmlAdditionalTagsWithData
Called from src/node/utils/ExportHtml.js
Things in context:
1. Pad object
Identical to `exportHtmlAdditionalTags`, but for tags that are stored with a specific value (not simply `true`) on the attribute pool. For example `['color', 'red']`, instead of `['bold', true]`. This hook will allow a plug-in developer to include more properties and attributes to support during HTML Export. An Array of arrays should be returned. The exported HTML will contain tags like `<span data-color="red">` for the content where attributes are `['color', 'red']`.
Example:
```
// Add the props to be supported in export
exports.exportHtmlAdditionalTagsWithData = function(hook, pad, cb){
var padId = pad.id;
cb([["color", "red"], ["color", "blue"]]);
};
```
## userLeave
Called from src/node/handler/PadMessageHandler.js
This in context:
1. session (including the pad id and author id)
This hook gets called when an author leaves a pad. This is useful if you want to perform certain actions after a pad has been edited
Example:
```
exports.userLeave = function(hook, session, callback) {
console.log('%s left pad %s', session.author, session.padId);
};
```
### clientReady
Called from src/node/handler/PadMessageHandler.js
This in context:
1. message
This hook gets called when handling a CLIENT_READY which is the first message from the client to the server.
Example:
```
exports.clientReady = function(hook, message) {
console.log('Client has entered the pad' + message.padId);
};
```

View File

@ -1,6 +1,6 @@
# HTTP API
== HTTP API
## What can I do with this API?
=== What can I do with this API?
The API gives another web application control of the pads. The basic functions are
* create/delete pads
@ -9,15 +9,15 @@ The API gives another web application control of the pads. The basic functions a
The API is designed in a way, so you can reuse your existing user system with their permissions, and map it to Etherpad. Means: Your web application still has to do authentication, but you can tell Etherpad via the api, which visitors should get which permissions. This allows Etherpad to fit into any web application and extend it with real-time functionality. You can embed the pads via an iframe into your website.
Take a look at [HTTP API client libraries](https://github.com/ether/etherpad-lite/wiki/HTTP-API-client-libraries) to check if a library in your favorite programming language is available.
Take a look at https://github.com/ether/etherpad-lite/wiki/HTTP-API-client-libraries[HTTP API client libraries] to check if a library in your favorite programming language is available.
### OpenAPI
==== OpenAPI
OpenAPI (formerly swagger) definitions are exposed under `/api/openapi.json` (latest) and `/api/{version}/openapi.json`. You can use official tools like [Swagger Editor](https://editor.swagger.io/) to view and explore them.
OpenAPI (formerly swagger) definitions are exposed under `/api/openapi.json` (latest) and `/api/{version}/openapi.json`. You can use official tools like https://editor.swagger.io/[Swagger Editor] to view and explore them.
## Examples
=== Examples
### Example 1
==== Example 1
A portal (such as WordPress) wants to give a user access to a new pad. Let's assume the user have the internal id 7 and his name is michael.
@ -47,7 +47,7 @@ Portal starts the session for the user on the group:
Portal places the cookie "sessionID" with the given value on the client and creates an iframe including the pad.
### Example 2
==== Example 2
A portal (such as WordPress) wants to transform the contents of a pad that multiple admins edited into a blog post.
@ -62,14 +62,14 @@ Portal submits content into new blog post
> Portal.AddNewBlog(content)
>
## Usage
=== Usage
### API version
The latest version is `1.2.14`
==== API version
The latest version is `1.2.15`
The current version can be queried via /api.
### Request Format
==== Request Format
The API is accessible via HTTP. Starting from **1.8**, API endpoints can be invoked indifferently via GET or POST.
@ -80,30 +80,37 @@ When invoking via GET (mandatory until **1.7.5** included), parameters must be i
Starting from Etherpad **1.8** it is also possible to invoke the HTTP API via POST. In this case, querystring parameters will still be accepted, but **any parameter with the same name sent via POST will take precedence**. If you need to send large chunks of text (for example, for `setText()`) it is advisable to invoke via POST.
Example with cURL using GET (toy example, no encoding):
```
[source,bash]
----
curl "http://pad.domain/api/1/setText?apikey=secret&padID=padname&text=this_text_will_NOT_be_encoded_by_curl_use_next_example"
```
----
Example with cURL using GET (better example, encodes text):
```
[source,bash]
----
curl "http://pad.domain/api/1/setText?apikey=secret&padID=padname" --get --data-urlencode "text=Text sent via GET with proper encoding. For big documents, please use POST"
```
----
Example with cURL using POST:
```
curl "http://pad.domain/api/1/setText?apikey=secret&padID=padname" --data-urlencode "text=Text sent via POST with proper encoding. For big texts (>8 KB), use this method"
```
### Response Format
[source,bash]
----
curl "http://pad.domain/api/1/setText?apikey=secret&padID=padname" --data-urlencode "text=Text sent via POST with proper encoding. For big texts (>8 KB), use this method"
----
==== Response Format
Responses are valid JSON in the following format:
```json
[source,jsonlines]
----
{
"code": number,
"message": string,
"data": obj
}
```
----
* **code** a return code
* **0** everything ok
@ -114,11 +121,11 @@ Responses are valid JSON in the following format:
* **message** a status message. It's ok if everything is fine, else it contains an error message
* **data** the payload
### Overview
==== Overview
![API Overview](https://i.imgur.com/d0nWp.png)
image::https://i.imgur.com/d0nWp.png[API Overview]
## Data Types
=== Data Types
* **groupID** a string, the unique id of a group. Format is g.16RANDOMCHARS, for example g.s8oes9dhwrvt0zif
* **sessionID** a string, the unique id of a session. Format is s.16RANDOMCHARS, for example s.s8oes9dhwrvt0zif
@ -126,230 +133,248 @@ Responses are valid JSON in the following format:
* **readOnlyID** a string, the unique id of a readonly relation to a pad. Format is r.16RANDOMCHARS, for example r.s8oes9dhwrvt0zif
* **padID** a string, format is GROUPID$PADNAME, for example the pad test of group g.s8oes9dhwrvt0zif has padID g.s8oes9dhwrvt0zif$test
### Authentication
==== Authentication
Authentication works via a token that is sent with each request as a post parameter. There is a single token per Etherpad deployment. This token will be random string, generated by Etherpad at the first start. It will be saved in APIKEY.txt in the root folder of Etherpad. Only Etherpad and the requesting application knows this key. Token management will not be exposed through this API.
### Node Interoperability
==== Node Interoperability
All functions will also be available through a node module accessible from other node.js applications.
### JSONP
=== API Methods
The API provides _JSONP_ support to allow requests from a server in a different domain.
Simply add `&jsonp=?` to the API call.
Example usage: https://api.jquery.com/jQuery.getJSON/
## API Methods
### Groups
==== Groups
Pads can belong to a group. The padID of grouppads is starting with a groupID like g.asdfasdfasdfasdf$test
#### createGroup()
===== createGroup()
* API >= 1
creates a new group
*Example returns:*
* `{code: 0, message:"ok", data: {groupID: g.s8oes9dhwrvt0zif}}`
_Example returns:_
#### createGroupIfNotExistsFor(groupMapper)
* `{code: 0, message:"ok", data: {groupID: g.s8oes9dhwrvt0zif}}`
===== createGroupIfNotExistsFor(groupMapper)
* API >= 1
this functions helps you to map your application group ids to Etherpad group ids
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {groupID: g.s8oes9dhwrvt0zif}}`
#### deleteGroup(groupID)
===== deleteGroup(groupID)
* API >= 1
deletes a group
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: null}`
* `{code: 1, message:"groupID does not exist", data: null}`
#### listPads(groupID)
===== listPads(groupID)
* API >= 1
returns all pads of this group
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {padIDs : ["g.s8oes9dhwrvt0zif$test", "g.s8oes9dhwrvt0zif$test2"]}`
* `{code: 1, message:"groupID does not exist", data: null}`
#### createGroupPad(groupID, padName [, text])
===== createGroupPad(groupID, padName, [text], [authorId])
* API >= 1
* `authorId` in API >= 1.3.0
creates a new pad in this group
*Example returns:*
* `{code: 0, message:"ok", data: null}`
* `{code: 1, message:"pad does already exist", data: null}`
_Example returns:_
* `{code: 0, message:"ok", data: {padID: "g.s8oes9dhwrvt0zif$test"}`
* `{code: 1, message:"padName does already exist", data: null}`
* `{code: 1, message:"groupID does not exist", data: null}`
#### listAllGroups()
===== listAllGroups()
* API >= 1.1
lists all existing groups
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {groupIDs: ["g.mKjkmnAbSMtCt8eL", "g.3ADWx6sbGuAiUmCy"]}}`
* `{code: 0, message:"ok", data: {groupIDs: []}}`
### Author
==== Author
These authors are bound to the attributes the users choose (color and name).
#### createAuthor([name])
===== createAuthor([name])
* API >= 1
creates a new author
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {authorID: "a.s8oes9dhwrvt0zif"}}`
#### createAuthorIfNotExistsFor(authorMapper [, name])
===== createAuthorIfNotExistsFor(authorMapper [, name])
* API >= 1
this functions helps you to map your application author ids to Etherpad author ids
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {authorID: "a.s8oes9dhwrvt0zif"}}`
#### listPadsOfAuthor(authorID)
===== listPadsOfAuthor(authorID)
* API >= 1
returns an array of all pads this author contributed to
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {padIDs: ["g.s8oes9dhwrvt0zif$test", "g.s8oejklhwrvt0zif$foo"]}}`
* `{code: 1, message:"authorID does not exist", data: null}`
#### getAuthorName(authorID)
===== getAuthorName(authorID)
* API >= 1.1
Returns the Author Name of the author
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {authorName: "John McLear"}}`
-> can't be deleted cause this would involve scanning all the pads where this author was
### Session
==== Session
Sessions can be created between a group and an author. This allows an author to access more than one group. The sessionID will be set as a cookie to the client and is valid until a certain date. The session cookie can also contain multiple comma-separated sessionIDs, allowing a user to edit pads in different groups at the same time. Only users with a valid session for this group, can access group pads. You can create a session after you authenticated the user at your web application, to give them access to the pads. You should save the sessionID of this session and delete it after the user logged out.
#### createSession(groupID, authorID, validUntil)
===== createSession(groupID, authorID, validUntil)
* API >= 1
creates a new session. validUntil is an unix timestamp in seconds
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {sessionID: "s.s8oes9dhwrvt0zif"}}`
* `{code: 1, message:"groupID doesn't exist", data: null}`
* `{code: 1, message:"authorID doesn't exist", data: null}`
* `{code: 1, message:"validUntil is in the past", data: null}`
#### deleteSession(sessionID)
===== deleteSession(sessionID)
* API >= 1
deletes a session
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: null}`
* `{code: 1, message:"sessionID does not exist", data: null}`
#### getSessionInfo(sessionID)
===== getSessionInfo(sessionID)
* API >= 1
returns informations about a session
returns information about a session
_Example returns:_
*Example returns:*
* `{code: 0, message:"ok", data: {authorID: "a.s8oes9dhwrvt0zif", groupID: g.s8oes9dhwrvt0zif, validUntil: 1312201246}}`
* `{code: 1, message:"sessionID does not exist", data: null}`
#### listSessionsOfGroup(groupID)
===== listSessionsOfGroup(groupID)
* API >= 1
returns all sessions of a group
*Example returns:*
_Example returns:_
* `{"code":0,"message":"ok","data":{"s.oxf2ras6lvhv2132":{"groupID":"g.s8oes9dhwrvt0zif","authorID":"a.akf8finncvomlqva","validUntil":2312905480}}}`
* `{code: 1, message:"groupID does not exist", data: null}`
#### listSessionsOfAuthor(authorID)
===== listSessionsOfAuthor(authorID)
* API >= 1
returns all sessions of an author
*Example returns:*
_Example returns:_
* `{"code":0,"message":"ok","data":{"s.oxf2ras6lvhv2132":{"groupID":"g.s8oes9dhwrvt0zif","authorID":"a.akf8finncvomlqva","validUntil":2312905480}}}`
* `{code: 1, message:"authorID does not exist", data: null}`
### Pad Content
==== Pad Content
Pad content can be updated and retrieved through the API
#### getText(padID, [rev])
===== getText(padID, [rev])
* API >= 1
returns the text of a pad
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {text:"Welcome Text"}}`
* `{code: 1, message:"padID does not exist", data: null}`
#### setText(padID, text)
===== setText(padID, text, [authorId])
* API >= 1
* `authorId` in API >= 1.3.0
Sets the text of a pad.
If your text is long (>8 KB), please invoke via POST and include `text` parameter in the body of the request, not in the URL (since Etherpad **1.8**).
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: null}`
* `{code: 1, message:"padID does not exist", data: null}`
* `{code: 1, message:"text too long", data: null}`
#### appendText(padID, text)
===== appendText(padID, text, [authorId])
* API >= 1.2.13
* `authorId` in API >= 1.3.0
Appends text to a pad.
If your text is long (>8 KB), please invoke via POST and include `text` parameter in the body of the request, not in the URL (since Etherpad **1.8**).
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: null}`
* `{code: 1, message:"padID does not exist", data: null}`
* `{code: 1, message:"text too long", data: null}`
#### getHTML(padID, [rev])
===== getHTML(padID, [rev])
* API >= 1
returns the text of a pad formatted as HTML
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {html:"Welcome Text<br>More Text"}}`
* `{code: 1, message:"padID does not exist", data: null}`
#### setHTML(padID, html)
===== setHTML(padID, html, [authorId])
* API >= 1
* `authorId` in API >= 1.3.0
sets the text of a pad based on HTML, HTML must be well-formed. Malformed HTML will send a warning to the API log.
If `html` is long (>8 KB), please invoke via POST and include `html` parameter in the body of the request, not in the URL (since Etherpad **1.8**).
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: null}`
* `{code: 1, message:"padID does not exist", data: null}`
#### getAttributePool(padID)
===== getAttributePool(padID)
* API >= 1.2.8
returns the attribute pool of a pad
*Example returns:*
_Example returns:_
* `{ "code":0,
"message":"ok",
"data": {
@ -372,12 +397,13 @@ returns the attribute pool of a pad
}`
* `{"code":1,"message":"padID does not exist","data":null}`
#### getRevisionChangeset(padID, [rev])
===== getRevisionChangeset(padID, [rev])
* API >= 1.2.8
get the changeset at a given revision, or last revision if 'rev' is not defined.
*Example returns:*
_Example returns:_
* `{ "code" : 0,
"message" : "ok",
"data" : "Z:1>6b|5+6b$Welcome to Etherpad!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nGet involved with Etherpad at https://etherpad.org\n"
@ -385,26 +411,30 @@ get the changeset at a given revision, or last revision if 'rev' is not defined.
* `{"code":1,"message":"padID does not exist","data":null}`
* `{"code":1,"message":"rev is higher than the head revision of the pad","data":null}`
#### createDiffHTML(padID, startRev, endRev)
===== createDiffHTML(padID, startRev, endRev)
* API >= 1.2.7
returns an object of diffs from 2 points in a pad
*Example returns:*
_Example returns:_
* `{"code":0,"message":"ok","data":{"html":"<style>\n.authora_HKIv23mEbachFYfH {background-color: #a979d9}\n.authora_n4gEeMLsv1GivNeh {background-color: #a9b5d9}\n.removed {text-decoration: line-through; -ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=80)'; filter: alpha(opacity=80); opacity: 0.8; }\n</style>Welcome to Etherpad!<br><br>This pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!<br><br>Get involved with Etherpad at <a href=\"http&#x3a;&#x2F;&#x2F;etherpad&#x2e;org\">http:&#x2F;&#x2F;etherpad.org</a><br><span class=\"authora_HKIv23mEbachFYfH\">aw</span><br><br>","authors":["a.HKIv23mEbachFYfH",""]}}`
* `{"code":4,"message":"no or wrong API Key","data":null}`
#### restoreRevision(padId, rev)
===== restoreRevision(padId, rev, [authorId])
* API >= 1.2.11
* `authorId` in API >= 1.3.0
Restores revision from past as new changeset
*Example returns:*
_Example returns:_
* {code:0, message:"ok", data:null}
* {code: 1, message:"padID does not exist", data: null}
### Chat
#### getChatHistory(padID, [start, end])
==== Chat
===== getChatHistory(padID, [start, end])
* API >= 1.2.7
returns
@ -413,245 +443,251 @@ returns
* the whole chat history, when no extra parameters are given
*Example returns:*
_Example returns:_
* `{"code":0,"message":"ok","data":{"messages":[{"text":"foo","userId":"a.foo","time":1359199533759,"userName":"test"},{"text":"bar","userId":"a.foo","time":1359199534622,"userName":"test"}]}}`
* `{code: 1, message:"start is higher or equal to the current chatHead", data: null}`
* `{code: 1, message:"padID does not exist", data: null}`
#### getChatHead(padID)
===== getChatHead(padID)
* API >= 1.2.7
returns the chatHead (last number of the last chat-message) of the pad
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {chatHead: 42}}`
* `{code: 1, message:"padID does not exist", data: null}`
#### appendChatMessage(padID, text, authorID [, time])
===== appendChatMessage(padID, text, authorID [, time])
* API >= 1.2.12
creates a chat message, saves it to the database and sends it to all connected clients of this pad
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: null}`
* `{code: 1, message:"text is no string", data: null}`
### Pad
=== Pad
Group pads are normal pads, but with the name schema GROUPID$PADNAME. A security manager controls access of them and it's forbidden for normal pads to include a $ in the name.
#### createPad(padID [, text])
==== createPad(padID, [text], [authorId])
* API >= 1
* `authorId` in API >= 1.3.0
creates a new (non-group) pad. Note that if you need to create a group Pad, you should call **createGroupPad**.
You get an error message if you use one of the following characters in the padID: "/", "?", "&" or "#".
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: null}`
* `{code: 1, message:"padID does already exist", data: null}`
* `{code: 1, message:"malformed padID: Remove special characters", data: null}`
#### getRevisionsCount(padID)
==== getRevisionsCount(padID)
* API >= 1
returns the number of revisions of this pad
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {revisions: 56}}`
* `{code: 1, message:"padID does not exist", data: null}`
#### getSavedRevisionsCount(padID)
==== getSavedRevisionsCount(padID)
* API >= 1.2.11
returns the number of saved revisions of this pad
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {savedRevisions: 42}}`
* `{code: 1, message:"padID does not exist", data: null}`
#### listSavedRevisions(padID)
==== listSavedRevisions(padID)
* API >= 1.2.11
returns the list of saved revisions of this pad
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {savedRevisions: [2, 42, 1337]}}`
* `{code: 1, message:"padID does not exist", data: null}`
#### saveRevision(padID [, rev])
==== saveRevision(padID [, rev])
* API >= 1.2.11
saves a revision
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: null}`
* `{code: 1, message:"padID does not exist", data: null}`
#### padUsersCount(padID)
==== padUsersCount(padID)
* API >= 1
returns the number of user that are currently editing this pad
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {padUsersCount: 5}}`
#### padUsers(padID)
==== padUsers(padID)
* API >= 1.1
returns the list of users that are currently editing this pad
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {padUsers: [{colorId:"#c1a9d9","name":"username1","timestamp":1345228793126,"id":"a.n4gEeMLsvg12452n"},{"colorId":"#d9a9cd","name":"Hmmm","timestamp":1345228796042,"id":"a.n4gEeMLsvg12452n"}]}}`
* `{code: 0, message:"ok", data: {padUsers: []}}`
#### deletePad(padID)
==== deletePad(padID)
* API >= 1
deletes a pad
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: null}`
* `{code: 1, message:"padID does not exist", data: null}`
#### copyPad(sourceID, destinationID[, force=false])
==== copyPad(sourceID, destinationID[, force=false])
* API >= 1.2.8
copies a pad with full history and chat. If force is true and the destination pad exists, it will be overwritten.
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: null}`
* `{code: 1, message:"padID does not exist", data: null}`
#### copyPadWithoutHistory(sourceID, destinationID[, force=false])
==== copyPadWithoutHistory(sourceID, destinationID, [force=false], [authorId])
* API >= 1.2.15
* `authorId` in API >= 1.3.0
copies a pad without copying the history and chat. If force is true and the destination pad exists, it will be overwritten.
Note that all the revisions will be lost! In most of the cases one should use `copyPad` API instead.
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: null}`
* `{code: 1, message:"padID does not exist", data: null}`
#### movePad(sourceID, destinationID[, force=false])
==== movePad(sourceID, destinationID[, force=false])
* API >= 1.2.8
moves a pad. If force is true and the destination pad exists, it will be overwritten.
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: null}`
* `{code: 1, message:"padID does not exist", data: null}`
#### getReadOnlyID(padID)
==== getReadOnlyID(padID)
* API >= 1
returns the read only link of a pad
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {readOnlyID: "r.s8oes9dhwrvt0zif"}}`
* `{code: 1, message:"padID does not exist", data: null}`
#### getPadID(readOnlyID)
==== getPadID(readOnlyID)
* API >= 1.2.10
returns the id of a pad which is assigned to the readOnlyID
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {padID: "p.s8oes9dhwrvt0zif"}}`
* `{code: 1, message:"padID does not exist", data: null}`
#### setPublicStatus(padID, publicStatus)
==== setPublicStatus(padID, publicStatus)
* API >= 1
sets a boolean for the public status of a pad
sets a boolean for the public status of a group pad
_Example returns:_
*Example returns:*
* `{code: 0, message:"ok", data: null}`
* `{code: 1, message:"padID does not exist", data: null}`
* `{code: 1, message:"You can only get/set the publicStatus of pads that belong to a group", data: null}`
#### getPublicStatus(padID)
==== getPublicStatus(padID)
* API >= 1
return true of false
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {publicStatus: true}}`
* `{code: 1, message:"padID does not exist", data: null}`
* `{code: 1, message:"You can only get/set the publicStatus of pads that belong to a group", data: null}`
#### setPassword(padID, password)
* API >= 1
returns ok or an error message
*Example returns:*
* `{code: 0, message:"ok", data: null}`
* `{code: 1, message:"padID does not exist", data: null}`
#### isPasswordProtected(padID)
* API >= 1
returns true or false
*Example returns:*
* `{code: 0, message:"ok", data: {passwordProtection: true}}`
* `{code: 1, message:"padID does not exist", data: null}`
#### listAuthorsOfPad(padID)
==== listAuthorsOfPad(padID)
* API >= 1
returns an array of authors who contributed to this pad
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {authorIDs : ["a.s8oes9dhwrvt0zif", "a.akf8finncvomlqva"]}`
* `{code: 1, message:"padID does not exist", data: null}`
#### getLastEdited(padID)
==== getLastEdited(padID)
* API >= 1
returns the timestamp of the last revision of the pad
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {lastEdited: 1340815946602}}`
* `{code: 1, message:"padID does not exist", data: null}`
#### sendClientsMessage(padID, msg)
==== sendClientsMessage(padID, msg)
* API >= 1.1
sends a custom message of type `msg` to the pad
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {}}`
* `{code: 1, message:"padID does not exist", data: null}`
#### checkToken()
==== checkToken()
* API >= 1.2
returns ok when the current api token is valid
*Example returns:*
_Example returns:_
* `{"code":0,"message":"ok","data":null}`
* `{"code":4,"message":"no or wrong API Key","data":null}`
### Pads
=== Pads
#### listAllPads()
==== listAllPads()
* API >= 1.2.1
lists all pads on this epl instance
*Example returns:*
_Example returns:_
* `{code: 0, message:"ok", data: {padIDs: ["testPad", "thePadsOfTheOthers"]}}`
### Global
==== Global
#### getStats()
===== getStats()
* API >= 1.2.14
get stats of the etherpad instance
*Example returns*
* `{"code":0,"message":"ok","data":{"totalPads":3,"totalSessions": 2,"totalActivePads": 1}}`
_Example returns_:
* `{"code":0,"message":"ok","data":{"totalPads":3,"totalSessions": 2,"totalActivePads": 1}}`

22
doc/api/pluginfw.adoc Normal file
View File

@ -0,0 +1,22 @@
== Plugin Framework
`require("ep_etherpad-lite/static/js/plugingfw/plugins")`
=== plugins.update
`require("ep_etherpad-lite/static/js/plugingfw/plugins").update()` will use npm
to list all installed modules and read their ep.json files, registering the
contained hooks. A hook registration is a pair of a hook name and a function
reference (filename for require() plus function name)
=== hooks.callAll
`require("ep_etherpad-lite/static/js/plugingfw/hooks").callAll("hook_name",
{argname:value})` will call all hook functions registered for `hook_name` with
`{argname:value}`.
=== hooks.aCallAll
?
=== ...

View File

@ -1,14 +0,0 @@
# Plugin Framework
`require("ep_etherpad-lite/static/js/plugingfw/plugins")`
## plugins.update
`require("ep_etherpad-lite/static/js/plugingfw/plugins").update()` will use npm to list all installed modules and read their ep.json files, registering the contained hooks.
A hook registration is a pair of a hook name and a function reference (filename for require() plus function name)
## hooks.callAll
`require("ep_etherpad-lite/static/js/plugingfw/hooks").callAll("hook_name", {argname:value})` will call all hook functions registered for `hook_name` with `{argname:value}`.
## hooks.aCallAll
?
## ...

View File

@ -1,7 +1,7 @@
# Toolbar controller
== Toolbar controller
src/node/utils/toolbar.js
## button(opts)
=== button(opts)
* {Object} `opts`
* `command` - this command fill be fired on the editbar on click
* `localizationId` - will be set as `data-l10-id`
@ -10,25 +10,28 @@ src/node/utils/toolbar.js
Returns: {Button}
Example:
```
[source, javascript]
----
var orderedlist = toolbar.button({
command: "insertorderedlist",
localizationId: "pad.toolbar.ol.title",
class: "buttonicon buttonicon-insertorderedlist"
})
```
----
You can also create buttons with text:
```
[source, javascript]
----
var myButton = toolbar.button({
command: "myButton",
localizationId: "myPlugin.toolbar.myButton",
class: "buttontext"
})
```
----
## selectButton(opts)
=== selectButton(opts)
* {Object} `opts`
* `id` - id of the menu item
* `selectId` - id of the select element
@ -36,11 +39,11 @@ var myButton = toolbar.button({
Returns: {SelectButton}
## SelectButton.addOption(value, text, attributes)
=== SelectButton.addOption(value, text, attributes)
* {String} value - The value of this option
* {String} text - the label text used for this option
* {Object} attributes - any additional html attributes go here (e.g. `data-l10n-id`)
## registerButton(name, item)
=== registerButton(name, item)
* {String} name - used to reference the item in the toolbar config in settings.json
* {Button|SelectButton} item - the button to add
* {Button|SelectButton} item - the button to add

View File

@ -1,52 +1,59 @@
html {
border-top: solid green 5pt;
}
body.apidoc {
width: 60%;
min-width: 10cm;
body {
border-top: solid #44b492 5pt;
line-height: 150%;
font-family: "Quicksand", sans-serif;
color: #313b4a;
max-width: 1440px;
margin: 0 auto;
padding: 20px;
}
#header {
padding: 1pc 0;
color: #111;
a {
color: #555;
}
a,
a:active {
color: #272;
h1,
h2 {
color: #44b492;
line-height: 100%;
}
a:focus,
h2 {
font-size: 48px;
}
h3 {
font-size: 1.8rem;
}
h4 {
font-size: 1.5rem;
}
h5 {
font-size: 1.2rem;
}
a:hover {
color: #050;
color: #44b492;
}
#apicontent a.mark,
#apicontent a.mark:active {
float: right;
color: #BBB;
font-size: 0.7cm;
text-decoration: none;
}
#apicontent a.mark:focus,
#apicontent a.mark:hover {
color: #AAA;
pre {
background-color: #e0e0e0;
padding: 20px;
}
#apicontent code {
padding: 1px;
background-color: #EEE;
border-radius: 4px;
border: 1px solid #DDD;
}
#apicontent pre>code {
display: block;
overflow: auto;
padding: 5px;
code {
background-color: #e0e0e0;
}
table, th, td {
img {
max-width: 100%;
}
table,
th,
td {
text-align: left;
border: 1px solid gray;
border-collapse: collapse;
@ -54,7 +61,7 @@ table, th, td {
th {
padding: 0.5em;
background: #EEE;
background: #eee;
}
td {

74
doc/cookies.adoc Normal file
View File

@ -0,0 +1,74 @@
== Cookies
Cookies used by Etherpad.
[cols="1,1,1,1,1,1,1,1"]
|===
| Name
| Sample value
| Domain
| Path
| Expires/max-age
| Http-only
| Secure
| Usage description
|express_sid
| s%3A7yCNjRmTW8ylGQ53I2IhOwYF9...
| example.org
|/
| Session
| true
| true
| Session ID of the https://expressjs.com[Express web framework]. When Etherpad is behind a reverse proxy, and an administrator wants to use session stickiness, he may use this cookie. If you are behind a reverse proxy, please remember to set `trustProxy: true` in `settings.json`. Set in https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/node/hooks/express/webaccess.js#L131[webaccess.js#L131].
|language
| en
| example.org
| /
| Session
| false
| true
| The language of the UI (e.g.: `en-GB`, `it`). Set in https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/static/js/pad_editor.js#L111[pad_editor.js#L111].
|prefs / prefsHttp
| %7B%22epThemesExtTheme%22...
| example.org
| /p
| year 3000
| false
| true
| Client-side preferences (e.g.: font family, chat always visible, show authorship colors, ...). Set in https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/static/js/pad_cookie.js#L49[pad_cookie.js#L49]. `prefs` is used if Etherpad is accessed over HTTPS, `prefsHttp` if accessed over HTTP. For more info see https://github.com/ether/etherpad-lite/issues/3179.
|token
| t.tFzkihhhBf4xKEpCK3PU
| example.org
| /
| 60 days
| false
| true
| A random token representing the author, of the form `t.randomstring_of_lenght_20`. The random string is generated by the client, at https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/static/js/pad.js#L55-L66[pad.js#L55-L66]. This cookie is always set by the client at https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/static/js/pad.js#L153-L158[pad.js#L153-L158] without any solicitation from the server. It is used for all the pads accessed via the web UI (not used for the HTTP API). On the server side, its value is accessed at https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/node/db/SecurityManager.js#L33[SecurityManager.js#L33].
|===
For more info, visit the related discussion at https://github.com/ether/etherpad-lite/issues/3563.
Etherpad HTTP API clients may make use (if they choose so) to send another cookie:
[cols="1,1,1"]
|===
| Name
| Sample value
| Domain
| Usage description
| sessionID
| s.1c70968b333b25476a2c7bdd0e0bed17
| example.org
| Sessions can be created between a group and an author. This allows an author to access more than one group. The sessionID will be set as a cookie to the client and is valid until a certain date. The session cookie can also contain multiple comma-separated sessionIDs, allowing a user to edit pads in different groups at the same time. More info - https://github.com/ether/etherpad-lite/blob/develop/doc/api/http_api.md#session
|===

View File

@ -1,18 +0,0 @@
# Cookies
Cookies used by Etherpad.
| Name | Sample value | Domain | Path | Expires/max-age | Http-only| Secure | Usage description |
|-----------------|------------------------------------|-------------|------|-----------------|----------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|express_sid | s%3A7yCNjRmTW8ylGQ53I2IhOwYF9... | example.org | / | Session | true | true | Session ID of the [Express web framework](https://expressjs.com). When Etherpad is behind a reverse proxy, and an administrator wants to use session stickiness, he may use this cookie. If you are behind a reverse proxy, please remember to set `trustProxy: true` in `settings.json`. Set in [webaccess.js#L131](https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/node/hooks/express/webaccess.js#L131). |
|language | en | example.org | / | Session | false | true | The language of the UI (e.g.: `en-GB`, `it`). Set in [pad_editor.js#L111](https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/static/js/pad_editor.js#L111). |
|prefs / prefsHttp| %7B%22epThemesExtTheme%22... | example.org | /p | year 3000 | false | true | Client-side preferences (e.g.: font family, chat always visible, show authorship colors, ...). Set in [pad_cookie.js#L49](https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/static/js/pad_cookie.js#L49). `prefs` is used if Etherpad is accessed over HTTPS, `prefsHttp` if accessed over HTTP. For more info see https://github.com/ether/etherpad-lite/issues/3179. |
|token | t.tFzkihhhBf4xKEpCK3PU | example.org | / | 60 days | false | true | A random token representing the author, of the form `t.randomstring_of_lenght_20`. The random string is generated by the client, at ([pad.js#L55-L66](https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/static/js/pad.js#L55-L66)). This cookie is always set by the client (at [pad.js#L153-L158](https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/static/js/pad.js#L153-L158)) without any solicitation from the server. It is used for all the pads accessed via the web UI (not used for the HTTP API). On the server side, its value is accessed at [SecurityManager.js#L33](https://github.com/ether/etherpad-lite/blob/01497aa399690e44393e91c19917d11d025df71b/src/node/db/SecurityManager.js#L33).|
For more info, visit the related discussion at https://github.com/ether/etherpad-lite/issues/3563.
Etherpad HTTP API clients may make use (if they choose so) to send another cookie:
| Name | Sample value | Domain | Usage description |
|-----------------|------------------------------------|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|sessionID | s.1c70968b333b25476a2c7bdd0e0bed17 | example.org | Sessions can be created between a group and an author. This allows an author to access more than one group. The sessionID will be set as a cookie to the client and is valid until a certain date. The session cookie can also contain multiple comma-separated sessionIDs, allowing a user to edit pads in different groups at the same time. More info - https://github.com/ether/etherpad-lite/blob/develop/doc/api/http_api.md#session |

View File

@ -1,11 +1,11 @@
# Database structure
== Database structure
## Keys and their values
=== Keys and their values
### groups
==== groups
A list of all existing groups (a JSON object with groupIDs as keys and `1` as values).
### pad:$PADID
==== pad:$PADID
Contains all information about pads
* **atext** - the latest attributed text
@ -15,7 +15,7 @@ Contains all information about pads
* **public** - flag that disables security for this pad
* **passwordHash** - string that contains a salted sha512 sum of this pad's password
### pad:$PADID:revs:$REVNUM
==== pad:$PADID:revs:$REVNUM
Saves a revision $REVNUM of pad $PADID
* **meta**
@ -23,45 +23,50 @@ Saves a revision $REVNUM of pad $PADID
* **timestamp** - the timestamp of when this revision was created
* **changeset** - the changeset of this revision
### pad:$PADID:chat:$CHATNUM
==== pad:$PADID:chat:$CHATNUM
Saves a chat entry with num $CHATNUM of pad $PADID
* **text** - the text of this chat entry
* **userId** - the authorID of this chat entry
* **time** - the timestamp of this chat entry
### pad2readonly:$PADID
==== pad2readonly:$PADID
Translates a padID to a readonlyID
### readonly2pad:$READONLYID
==== readonly2pad:$READONLYID
Translates a readonlyID to a padID
### token2author:$TOKENID
==== token2author:$TOKENID
Translates a token to an authorID
### globalAuthor:$AUTHORID
==== globalAuthor:$AUTHORID
Information about an author
* **name** - the name of this author as shown in the pad
* **colorID** - the colorID of this author as shown in the pad
### mapper2group:$MAPPER
==== mapper2group:$MAPPER
Maps an external application identifier to an internal group
### mapper2author:$MAPPER
==== mapper2author:$MAPPER
Maps an external application identifier to an internal author
### group:$GROUPID
==== group:$GROUPID
a group of pads
* **pads** - object with pad names in it, values are 1
### session:$SESSIONID
==== session:$SESSIONID
a session between an author and a group
* **groupID** - the groupID the session belongs too
* **authorID** - the authorID the session belongs too
* **validUntil** - the timestamp until this session is valid
### author2sessions:$AUTHORID
==== author2sessions:$AUTHORID
saves the sessions of an author
* **sessionsIDs** - object with sessionIDs in it, values are 1
### group2sessions:$GROUPID
==== group2sessions:$GROUPID
* **sessionsIDs** - object with sessionIDs in it, values are 1

538
doc/docker.adoc Normal file
View File

@ -0,0 +1,538 @@
== Docker
The official Docker image is available on https://hub.docker.com/r/etherpad/etherpad.
=== Downloading from Docker Hub
If you are ok downloading a https://hub.docker.com/r/etherpad/etherpad[prebuilt image from Docker Hub], these are the commands:
[source, bash]
----
# gets the latest published version
docker pull etherpad/etherpad
# gets a specific version
docker pull etherpad/etherpad:1.8.0
----
=== Build a personalized container
If you want to use a personalized settings file, **you will have to rebuild your image**.
All of the following instructions are as a member of the `docker` group.
By default, the Etherpad Docker image is built and run in `production` mode: no development dependencies are installed, and asset bundling speeds up page load time.
==== Rebuilding with custom settings
Edit `<BASEDIR>/settings.json.docker` at your will. When rebuilding the image, this file will be copied inside your image and renamed to `settings.json`.
**Each configuration parameter can also be set via an environment variable**, using the syntax `"${ENV_VAR}"` or `"${ENV_VAR:default_value}"`. For details, refer to `settings.json.template`.
==== Rebuilding including some plugins
If you want to install some plugins in your container, it is sufficient to list them in the ETHERPAD_PLUGINS build variable.
The variable value has to be a space separated, double quoted list of plugin names (see examples).
Some plugins will need personalized settings. Just refer to the previous section, and include them in your custom `settings.json.docker`.
==== Rebuilding including export functionality for DOC/PDF/ODT
If you want to be able to export your pads to DOC/PDF/ODT files, you can install
either Abiword or Libreoffice via setting a build variable.
===== Via Abiword
For installing Abiword, set the `INSTALL_ABIWORD` build variable to any value.
Also, you will need to configure the path to the abiword executable
via setting the `abiword` property in `<BASEDIR>/settings.json.docker` to
`/usr/bin/abiword` or via setting the environment variable `ABIWORD` to
`/usr/bin/abiword`.
===== Via Libreoffice
For installing Libreoffice instead, set the `INSTALL_SOFFICE` build variable
to any value.
Also, you will need to configure the path to the libreoffice executable
via setting the `soffice` property in `<BASEDIR>/settings.json.docker` to
`/usr/bin/soffice` or via setting the environment variable `SOFFICE` to
`/usr/bin/soffice`.
==== Examples
Build a Docker image from the currently checked-out code:
[source,bash]
----
docker build --tag <YOUR_USERNAME>/etherpad .
----
Include two plugins in the container:
[source,bash]
----
docker build --build-arg ETHERPAD_PLUGINS="ep_comments_page ep_author_neat" --tag <YOUR_USERNAME>/etherpad .
----
=== Running your instance:
To run your instance:
[source,bash]
----
docker run --detach --publish <DESIRED_PORT>:9001 <YOUR_USERNAME>/etherpad
----
And point your browser to `http://<YOUR_IP>:<DESIRED_PORT>`
=== Options available by default
The `settings.json.docker` available by default allows to control almost every setting via environment variables.
==== General
[cols="1,1,1"]
|===
| Variable
| Description
| Default
| `TITLE`
| The name of the instance
| `Etherpad`
| `FAVICON`
| favicon default name, or a fully specified URL to your own favicon
| `favicon.ico`
| `DEFAULT_PAD_TEXT`
| The default text of a pad
| `Welcome to Etherpad! This pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents! Get involved with Etherpad at https://etherpad.org`
| `IP`
| IP which etherpad should bind at. Change to `::` for IPv6
| `0.0.0.0`
| `PORT`
| port which etherpad should bind at
| `9001`
| `ADMIN_PASSWORD`
| the password for the `admin` user (leave unspecified if you do not want to create it)
|
| `USER_PASSWORD`
| the password for the first user `user` (leave unspecified if you do not want to create it)
|
|===
==== Database
[cols="1,1,1"]
|===
| Variable
| Description
| Default
| `DB_TYPE` | a database supported by https://www.npmjs.com/package/ueberdb2 | not set, thus will fall back to `DirtyDB` (please choose one instead)
| `DB_HOST` | the host of the database
|
| `DB_PORT`
| the port of the database
|
| `DB_NAME`
| the database name
|
| `DB_USER`
| a database user with sufficient permissions to create tables
|
| `DB_PASS`
| the password for the database username
|
| `DB_CHARSET`
| the character set for the tables (only required for MySQL)
|
| `DB_FILENAME`
| in case `DB_TYPE` is `DirtyDB` or `sqlite`, the database file.
| `var/dirty.db`, `var/etherpad.sq3`
|===
If your database needs additional settings, you will have to use a personalized `settings.json.docker` and rebuild the container (or otherwise put the updated `settings.json` inside your image).
==== Pad Options
[cols="1,1,1"]
|===
| Variable
| Description
| Default
| `PAD_OPTIONS_NO_COLORS`
|
| `false`
| `PAD_OPTIONS_SHOW_CONTROLS`
|
| `true`
| `PAD_OPTIONS_SHOW_CHAT`
|
| `true`
| `PAD_OPTIONS_SHOW_LINE_NUMBERS`
|
| `true`
| `PAD_OPTIONS_USE_MONOSPACE_FONT`
|
| `false`
| `PAD_OPTIONS_USER_NAME`
|
| `null`
| `PAD_OPTIONS_USER_COLOR`
|
| `null`
| `PAD_OPTIONS_RTL`
|
| `false`
| `PAD_OPTIONS_ALWAYS_SHOW_CHAT`
|
| `false`
| `PAD_OPTIONS_CHAT_AND_USERS`
|
| `false`
| `PAD_OPTIONS_LANG`
|
| `null`
|===
==== Shortcuts
[cols="1,1,1"]
|===
| Variable
| Description
| Default
| `PAD_SHORTCUTS_ENABLED_ALT_F9`
| focus on the File Menu and/or editbar
| `true`
| `PAD_SHORTCUTS_ENABLED_ALT_C`
| focus on the Chat window
| `true`
| `PAD_SHORTCUTS_ENABLED_CMD_S`
| save a revision
| `true`
| `PAD_SHORTCUTS_ENABLED_CMD_Z`
| undo/redo
| `true`
| `PAD_SHORTCUTS_ENABLED_CMD_Y`
| redo
| `true`
| `PAD_SHORTCUTS_ENABLED_CMD_I`
| italic
| `true`
| `PAD_SHORTCUTS_ENABLED_CMD_B`
| bold
| `true`
| `PAD_SHORTCUTS_ENABLED_CMD_U`
| underline
| `true`
| `PAD_SHORTCUTS_ENABLED_CMD_H`
| backspace
| `true`
| `PAD_SHORTCUTS_ENABLED_CMD_5`
| strike through
| `true`
| `PAD_SHORTCUTS_ENABLED_CMD_SHIFT_1`
| ordered list
| `true`
| `PAD_SHORTCUTS_ENABLED_CMD_SHIFT_2`
| shows a gritter popup showing a line author
| `true`
| `PAD_SHORTCUTS_ENABLED_CMD_SHIFT_L`
| unordered list
| `true`
| `PAD_SHORTCUTS_ENABLED_CMD_SHIFT_N`
| ordered list
|`true`
| `PAD_SHORTCUTS_ENABLED_CMD_SHIFT_C`
| clear authorship
| `true`
| `PAD_SHORTCUTS_ENABLED_DELETE`
|
| `true`
| `PAD_SHORTCUTS_ENABLED_RETURN`
|
| `true`
| `PAD_SHORTCUTS_ENABLED_ESC`
| in mozilla versions 14-19 avoid reconnecting pad
| `true`
| `PAD_SHORTCUTS_ENABLED_TAB`
| indent
| `true`
| `PAD_SHORTCUTS_ENABLED_CTRL_HOME`
| scroll to top of pad
| `true`
| `PAD_SHORTCUTS_ENABLED_PAGE_UP`
|
| `true`
| `PAD_SHORTCUTS_ENABLED_PAGE_DOWN`
|
| `true`
|===
==== Skins
You can use the UI skin variants builder at `/p/test#skinvariantsbuilder`
For the colibris skin only, you can choose how to render the three main containers:
* toolbar (top menu with icons)
* editor (containing the text of the pad)
* background (area outside of editor, mostly visible when using page style)
For each of the 3 containers you can choose 4 color combinations:
* super-light
* light
* dark
* super-dark
For the editor container, you can also make it full width by adding `full-width-editor` variant (by default editor is rendered as a page, with a max-width of 900px).
[cols="1,1,1"]
|===
| Variable
| Description
| Default
| `SKIN_NAME`
| either `no-skin`, `colibris` or an existing directory under `src/static/skins`
| `colibris`
| `SKIN_VARIANTS`
| multiple skin variants separated by spaces
| `super-light-toolbar super-light-editor light-background`
|===
==== Logging
[cols="1,1,1"]
|===
| Variable
| Description
| Default
| `LOGLEVEL`
| valid values are `DEBUG`, `INFO`, `WARN` and `ERROR` | `INFO`
| `DISABLE_IP_LOGGING`
| Privacy: disable IP logging
| `false`
|===
==== Advanced
[cols="1,1,1"]
|===
| Variable
| Description
| Default
|`COOKIE_KEY_ROTATION_INTERVAL`
|How often (ms) to rotate in a new secret for signing cookies
|`86400000` (1 day)
| `COOKIE_SAME_SITE`
| Value of the SameSite cookie property.
| `"Lax"`
| `COOKIE_SESSION_LIFETIME`
| How long (ms) a user can be away before they must log in again.
| `864000000` (10 days)
| `COOKIE_SESSION_REFRESH_INTERVAL`
| How often (ms) to write the latest cookie expiration time.
| `86400000` (1 day)
| `SHOW_SETTINGS_IN_ADMIN_PAGE`
| hide/show the settings.json in admin page
| `true`
| `TRUST_PROXY`
| set to `true` if you are using a reverse proxy in front of Etherpad (for example: Traefik for SSL termination via Let's Encrypt). This will affect security and correctness of the logs if not done
| `false`
| `IMPORT_MAX_FILE_SIZE`
| maximum allowed file size when importing a pad, in bytes.
| `52428800` (50 MB)
| `IMPORT_EXPORT_MAX_REQ_PER_IP`
| maximum number of import/export calls per IP.
| `10`
| `IMPORT_EXPORT_RATE_LIMIT_WINDOW`
| the call rate for import/export requests will be estimated in this time window (in milliseconds)
| `90000`
| `COMMIT_RATE_LIMIT_DURATION`
| duration of the rate limit window for commits by individual users/IPs (in seconds) | `1`
| `COMMIT_RATE_LIMIT_POINTS`
| maximum number of changes per IP to allow during the rate limit window
| `10`
| `SUPPRESS_ERRORS_IN_PAD_TEXT`
| Should we suppress errors from being visible in the default Pad Text?
| `false
| `REQUIRE_SESSION`
| If this option is enabled, a user must have a session to access pads. This effectively allows only group pads to be accessed.
| `false`
| `EDIT_ONLY`
| Users may edit pads but not create new ones. Pad creation is only via the API. This applies both to group pads and regular pads.
| `false`
| `MINIFY`
| If true, all css & js will be minified before sending to the client. This will improve the loading performance massively, but makes it difficult to debug the javascript/css
| `true`
| `MAX_AGE`
| How long may clients use served javascript code (in seconds)? Not setting this may cause problems during deployment. Set to 0 to disable caching.
| `21600` (6 hours)
| `ABIWORD`
| Absolute path to the Abiword executable. Abiword is needed to get advanced import/export features of pads. Setting it to null disables Abiword and will only allow plain text and HTML import/exports.
| `null`
| `SOFFICE`
| This is the absolute path to the soffice executable. LibreOffice can be used in lieu of Abiword to export pads. Setting it to null disables LibreOffice exporting.
| `null`
| `TIDY_HTML`
| Path to the Tidy executable. Tidy is used to improve the quality of exported pads. Setting it to null disables Tidy.
| `null`
| `ALLOW_UNKNOWN_FILE_ENDS`
| Allow import of file types other than the supported ones: txt, doc, docx, rtf, odt, html & htm
| `true`
| `REQUIRE_AUTHENTICATION`
| This setting is used if you require authentication of all users. Note: "/admin" always requires authentication.
| `false`
| `REQUIRE_AUTHORIZATION`
| Require authorization by a module, or a user with is_admin set, see below.
| `false`
| `AUTOMATIC_RECONNECTION_TIMEOUT`
| Time (in seconds) to automatically reconnect pad when a "Force reconnect" message is shown to user. Set to 0 to disable automatic reconnection.
| `0`
| `FOCUS_LINE_PERCENTAGE_ABOVE`
| Percentage of viewport height to be additionally scrolled. e.g. 0.5, to place caret line in the middle of viewport, when user edits a line above of the viewport. Set to 0 to disable extra scrolling
| `0`
| `FOCUS_LINE_PERCENTAGE_BELOW`
| Percentage of viewport height to be additionally scrolled. e.g. 0.5, to place caret line in the middle of viewport, when user edits a line below of the viewport. Set to 0 to disable extra scrolling
| `0`
| `FOCUS_LINE_PERCENTAGE_ARROW_UP`
| Percentage of viewport height to be additionally scrolled when user presses arrow up in the line of the top of the viewport. Set to 0 to let the scroll to be handled as default by Etherpad
| `0`
| `FOCUS_LINE_DURATION`
| Time (in milliseconds) used to animate the scroll transition. Set to 0 to disable animation
| `0`
| `FOCUS_LINE_CARET_SCROLL`
| Flag to control if it should scroll when user places the caret in the last line of the viewport
| `false`
| `SOCKETIO_MAX_HTTP_BUFFER_SIZE`
| The maximum size (in bytes) of a single message accepted via Socket.IO. If a client sends a larger message, its connection gets closed to prevent DoS (memory exhaustion) attacks.
| `10000`
| `LOAD_TEST`
| Allow Load Testing tools to hit the Etherpad Instance. WARNING: this will disable security on the instance.
| `false`
| `DUMP_ON_UNCLEAN_EXIT`
| Enable dumping objects preventing a clean exit of Node.js. WARNING: this has a significant performance impact.
| `false`
| `EXPOSE_VERSION`
| Expose Etherpad version in the web interface and in the Server http header. Do not enable on production machines.
| `false`
|===
==== Examples
Use a Postgres database, no admin user enabled:
[source,bash]
----
docker run -d \
--name etherpad \
-p 9001:9001 \
-e 'DB_TYPE=postgres' \
-e 'DB_HOST=db.local' \
-e 'DB_PORT=4321' \
-e 'DB_NAME=etherpad' \
-e 'DB_USER=dbusername' \
-e 'DB_PASS=mypassword' \
etherpad/etherpad
----
Run enabling the administrative user `admin`:
[source,bash]
----
docker run -d \
--name etherpad \
-p 9001:9001 \
-e 'ADMIN_PASSWORD=supersecret' \
etherpad/etherpad
----
Run a test instance running DirtyDB on a persistent volume:
[source, bash]
----
docker run -d \
-v etherpad_data:/opt/etherpad-lite/var \
-p 9001:9001 \
etherpad/etherpad
----

View File

@ -1,227 +0,0 @@
# Docker
The official Docker image is available on https://hub.docker.com/r/etherpad/etherpad.
## Downloading from Docker Hub
If you are ok downloading a [prebuilt image from Docker Hub](https://hub.docker.com/r/etherpad/etherpad), these are the commands:
```bash
# gets the latest published version
docker pull etherpad/etherpad
# gets a specific version
docker pull etherpad/etherpad:1.8.0
```
## Build a personalized container
If you want to use a personalized settings file, **you will have to rebuild your image**.
All of the following instructions are as a member of the `docker` group.
By default, the Etherpad Docker image is built and run in `production` mode: no development dependencies are installed, and asset bundling speeds up page load time.
### Rebuilding with custom settings
Edit `<BASEDIR>/settings.json.docker` at your will. When rebuilding the image, this file will be copied inside your image and renamed to `setting.json`.
**Each configuration parameter can also be set via an environment variable**, using the syntax `"${ENV_VAR}"` or `"${ENV_VAR:default_value}"`. For details, refer to `settings.json.template`.
### Rebuilding including some plugins
If you want to install some plugins in your container, it is sufficient to list them in the ETHERPAD_PLUGINS build variable.
The variable value has to be a space separated, double quoted list of plugin names (see examples).
Some plugins will need personalized settings. Just refer to the previous section, and include them in your custom `settings.json.docker`.
### Examples
Build a Docker image from the currently checked-out code:
```bash
docker build --tag <YOUR_USERNAME>/etherpad .
```
Include two plugins in the container:
```bash
docker build --build-arg ETHERPAD_PLUGINS="ep_comments_page ep_author_neat" --tag <YOUR_USERNAME>/etherpad .
```
## Running your instance:
To run your instance:
```bash
docker run --detach --publish <DESIRED_PORT>:9001 <YOUR_USERNAME>/etherpad
```
And point your browser to `http://<YOUR_IP>:<DESIRED_PORT>`
## Options available by default
The `settings.json.docker` available by default allows to control almost every setting via environment variables.
### General
| Variable | Description | Default |
| ------------------ | ------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `TITLE` | The name of the instance | `Etherpad` |
| `FAVICON` | favicon default name, or a fully specified URL to your own favicon | `favicon.ico` |
| `DEFAULT_PAD_TEXT` | The default text of a pad | `Welcome to Etherpad! This pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents! Get involved with Etherpad at https://etherpad.org` |
| `IP` | IP which etherpad should bind at. Change to `::` for IPv6 | `0.0.0.0` |
| `PORT` | port which etherpad should bind at | `9001` |
| `ADMIN_PASSWORD` | the password for the `admin` user (leave unspecified if you do not want to create it) | |
| `USER_PASSWORD` | the password for the first user `user` (leave unspecified if you do not want to create it) | |
### Database
| Variable | Description | Default |
| ------------- | -------------------------------------------------------------- | --------------------------------------------------------------------- |
| `DB_TYPE` | a database supported by https://www.npmjs.com/package/ueberdb2 | not set, thus will fall back to `DirtyDB` (please choose one instead) |
| `DB_HOST` | the host of the database | |
| `DB_PORT` | the port of the database | |
| `DB_NAME` | the database name | |
| `DB_USER` | a database user with sufficient permissions to create tables | |
| `DB_PASS` | the password for the database username | |
| `DB_CHARSET` | the character set for the tables (only required for MySQL) | |
| `DB_FILENAME` | in case `DB_TYPE` is `DirtyDB`, the database filename. | `var/dirty.db` |
If your database needs additional settings, you will have to use a personalized `settings.json.docker` and rebuild the container (or otherwise put the updated `settings.json` inside your image).
### Pad Options
| Variable | Description | Default |
| -------------------------------- | ----------- | ------- |
| `PAD_OPTIONS_NO_COLORS` | | `false` |
| `PAD_OPTIONS_SHOW_CONTROLS` | | `true` |
| `PAD_OPTIONS_SHOW_CHAT` | | `true` |
| `PAD_OPTIONS_SHOW_LINE_NUMBERS` | | `true` |
| `PAD_OPTIONS_USE_MONOSPACE_FONT` | | `false` |
| `PAD_OPTIONS_USER_NAME` | | `false` |
| `PAD_OPTIONS_USER_COLOR` | | `false` |
| `PAD_OPTIONS_RTL` | | `false` |
| `PAD_OPTIONS_ALWAYS_SHOW_CHAT` | | `false` |
| `PAD_OPTIONS_CHAT_AND_USERS` | | `false` |
| `PAD_OPTIONS_LANG` | | `en-gb` |
### Shortcuts
| Variable | Description | Default |
| ----------------------------------- | ------------------------------------------------ | ------- |
| `PAD_SHORTCUTS_ENABLED_ALT_F9` | focus on the File Menu and/or editbar | `true` |
| `PAD_SHORTCUTS_ENABLED_ALT_C` | focus on the Chat window | `true` |
| `PAD_SHORTCUTS_ENABLED_CMD_S` | save a revision | `true` |
| `PAD_SHORTCUTS_ENABLED_CMD_Z` | undo/redo | `true` |
| `PAD_SHORTCUTS_ENABLED_CMD_Y` | redo | `true` |
| `PAD_SHORTCUTS_ENABLED_CMD_I` | italic | `true` |
| `PAD_SHORTCUTS_ENABLED_CMD_B` | bold | `true` |
| `PAD_SHORTCUTS_ENABLED_CMD_U` | underline | `true` |
| `PAD_SHORTCUTS_ENABLED_CMD_H` | backspace | `true` |
| `PAD_SHORTCUTS_ENABLED_CMD_5` | strike through | `true` |
| `PAD_SHORTCUTS_ENABLED_CMD_SHIFT_1` | ordered list | `true` |
| `PAD_SHORTCUTS_ENABLED_CMD_SHIFT_2` | shows a gritter popup showing a line author | `true` |
| `PAD_SHORTCUTS_ENABLED_CMD_SHIFT_L` | unordered list | `true` |
| `PAD_SHORTCUTS_ENABLED_CMD_SHIFT_N` | ordered list | `true` |
| `PAD_SHORTCUTS_ENABLED_CMD_SHIFT_C` | clear authorship | `true` |
| `PAD_SHORTCUTS_ENABLED_DELETE` | | `true` |
| `PAD_SHORTCUTS_ENABLED_RETURN` | | `true` |
| `PAD_SHORTCUTS_ENABLED_ESC` | in mozilla versions 14-19 avoid reconnecting pad | `true` |
| `PAD_SHORTCUTS_ENABLED_TAB` | indent | `true` |
| `PAD_SHORTCUTS_ENABLED_CTRL_HOME` | scroll to top of pad | `true` |
| `PAD_SHORTCUTS_ENABLED_PAGE_UP` | | `true` |
| `PAD_SHORTCUTS_ENABLED_PAGE_DOWN` | | `true` |
### Skins
You can use the UI skin variants builder at `/p/test#skinvariantsbuilder`
For the colibris skin only, you can choose how to render the three main containers:
* toolbar (top menu with icons)
* editor (containing the text of the pad)
* background (area outside of editor, mostly visible when using page style)
For each of the 3 containers you can choose 4 color combinations:
* super-light
* light
* dark
* super-dark
For the editor container, you can also make it full width by adding `full-width-editor` variant (by default editor is rendered as a page, with a max-width of 900px).
| Variable | Description | Default |
| --------------- | ------------------------------------------------------------------------------ | --------------------------------------------------------- |
| `SKIN_NAME` | either `no-skin`, `colibris` or an existing directory under `src/static/skins` | `colibris` |
| `SKIN_VARIANTS` | multiple skin variants separated by spaces | `super-light-toolbar super-light-editor light-background` |
### Logging
| Variable | Description | Default |
| -------------------- | ---------------------------------------------------- | ------- |
| `LOGLEVEL` | valid values are `DEBUG`, `INFO`, `WARN` and `ERROR` | `INFO` |
| `DISABLE_IP_LOGGING` | Privacy: disable IP logging | `false` |
### Advanced
| Variable | Description | Default |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------ |
| `SHOW_SETTINGS_IN_ADMIN_PAGE` | hide/show the settings.json in admin page | `true` |
| `TRUST_PROXY` | set to `true` if you are using a reverse proxy in front of Etherpad (for example: Traefik for SSL termination via Let's Encrypt). This will affect security and correctness of the logs if not done | `false` |
| `IMPORT_MAX_FILE_SIZE` | maximum allowed file size when importing a pad, in bytes. | `52428800` (50 MB) |
| `IMPORT_EXPORT_MAX_REQ_PER_IP` | maximum number of import/export calls per IP. | `10` |
| `IMPORT_EXPORT_RATE_LIMIT_WINDOW` | the call rate for import/export requests will be estimated in this time window (in milliseconds) | `90000` |
| `SUPPRESS_ERRORS_IN_PAD_TEXT` | Should we suppress errors from being visible in the default Pad Text? | `false` |
| `REQUIRE_SESSION` | If this option is enabled, a user must have a session to access pads. This effectively allows only group pads to be accessed. | `false` |
| `EDIT_ONLY` | Users may edit pads but not create new ones. Pad creation is only via the API. This applies both to group pads and regular pads. | `false` |
| `SESSION_NO_PASSWORD` | If set to true, those users who have a valid session will automatically be granted access to password protected pads. | `false` |
| `MINIFY` | If true, all css & js will be minified before sending to the client. This will improve the loading performance massively, but makes it difficult to debug the javascript/css | `true` |
| `MAX_AGE` | How long may clients use served javascript code (in seconds)? Not setting this may cause problems during deployment. Set to 0 to disable caching. | `21600` (6 hours) |
| `ABIWORD` | Absolute path to the Abiword executable. Abiword is needed to get advanced import/export features of pads. Setting it to null disables Abiword and will only allow plain text and HTML import/exports. | `null` |
| `SOFFICE` | This is the absolute path to the soffice executable. LibreOffice can be used in lieu of Abiword to export pads. Setting it to null disables LibreOffice exporting. | `null` |
| `TIDY_HTML` | Path to the Tidy executable. Tidy is used to improve the quality of exported pads. Setting it to null disables Tidy. | `null` |
| `ALLOW_UNKNOWN_FILE_ENDS` | Allow import of file types other than the supported ones: txt, doc, docx, rtf, odt, html & htm | `true` |
| `REQUIRE_AUTHENTICATION` | This setting is used if you require authentication of all users. Note: "/admin" always requires authentication. | `false` |
| `REQUIRE_AUTHORIZATION` | Require authorization by a module, or a user with is_admin set, see below. | `false` |
| `AUTOMATIC_RECONNECTION_TIMEOUT` | Time (in seconds) to automatically reconnect pad when a "Force reconnect" message is shown to user. Set to 0 to disable automatic reconnection. | `0` |
| `FOCUS_LINE_PERCENTAGE_ABOVE` | Percentage of viewport height to be additionally scrolled. e.g. 0.5, to place caret line in the middle of viewport, when user edits a line above of the viewport. Set to 0 to disable extra scrolling | `0` |
| `FOCUS_LINE_PERCENTAGE_BELOW` | Percentage of viewport height to be additionally scrolled. e.g. 0.5, to place caret line in the middle of viewport, when user edits a line below of the viewport. Set to 0 to disable extra scrolling | `0` |
| `FOCUS_LINE_PERCENTAGE_ARROW_UP` | Percentage of viewport height to be additionally scrolled when user presses arrow up in the line of the top of the viewport. Set to 0 to let the scroll to be handled as default by Etherpad | `0` |
| `FOCUS_LINE_DURATION` | Time (in milliseconds) used to animate the scroll transition. Set to 0 to disable animation | `0` |
| `FOCUS_LINE_CARET_SCROLL` | Flag to control if it should scroll when user places the caret in the last line of the viewport | `false` |
| `LOAD_TEST` | Allow Load Testing tools to hit the Etherpad Instance. WARNING: this will disable security on the instance. | `false` |
| `EXPOSE_VERSION` | Expose Etherpad version in the web interface and in the Server http header. Do not enable on production machines. | `false` |
### Examples
Use a Postgres database, no admin user enabled:
```shell
docker run -d \
--name etherpad \
-p 9001:9001 \
-e 'DB_TYPE=postgres' \
-e 'DB_HOST=db.local' \
-e 'DB_PORT=4321' \
-e 'DB_NAME=etherpad' \
-e 'DB_USER=dbusername' \
-e 'DB_PASS=mypassword' \
etherpad/etherpad
```
Run enabling the administrative user `admin`:
```shell
docker run -d \
--name etherpad \
-p 9001:9001 \
-e 'ADMIN_PASSWORD=supersecret' \
etherpad/etherpad
```
Run a test instance running DirtyDB on a persistent volume:
```
docker run -d \
-v etherpad_data:/opt/etherpad-lite/var \
-p 9001:9001 \
etherpad/etherpad
```

View File

@ -1,6 +1,4 @@
# About this Documentation
<!-- type=misc -->
== About this Documentation
The goal of this documentation is to comprehensively explain Etherpad,
both from a reference as well as a conceptual point of view.
@ -11,5 +9,5 @@ heading.
Every `.html` file is generated based on the corresponding
`.md` file in the `doc/api/` folder in the source tree. The
documentation is generated using the `bin/doc/generate.js` program.
documentation is generated using the `src/bin/doc/generate.js` program.
The HTML template is located at `doc/template.html`.

25
doc/index.adoc Normal file
View File

@ -0,0 +1,25 @@
:version: {VERSION}
= Etherpad v{version} Manual &amp; Documentation
:stylesheet: assets/style.css
:toc:
:toclevels: 4
:source-highlighter: highlight.js
include::./documentation.adoc[]
include::./stats.adoc[]
include::./localization.adoc[]
include::./docker.adoc[]
include::./skins.adoc[]
include::./api/api.adoc[]
include::./plugins.adoc[]
include::./cookies.adoc[]
include::./database.adoc[]

View File

@ -1,9 +0,0 @@
@include documentation
@include stats
@include localization
@include docker
@include skins
@include api/api
@include plugins
@include cookies
@include database

View File

@ -1,105 +1,125 @@
# Localization
== Localization
Etherpad provides a multi-language user interface, that's apart from your users' content, so users from different countries can collaborate on a single document, while still having the user interface displayed in their mother tongue.
## Translating
=== Translating
We rely on https://translatewiki.net to handle the translation process for us, so if you'd like to help...
1. Sign up at https://translatewiki.net
2. Visit our [TWN project page](https://translatewiki.net/wiki/Translating:Etherpad_lite)
2. Visit our https://translatewiki.net/wiki/Translating:Etherpad_lite[TWN project page]
3. Click on `Translate Etherpad lite interface`
4. Choose a target language, you'd like to translate our interface to, and hit `Fetch`
5. Start translating!
Translations will be send back to us regularly and will eventually appear in the next release.
## Implementation
=== Implementation
### Server-side
==== Server-side
`/src/locales` contains files for all supported languages which contain the translated strings. Translation files are simple `*.json` files and look like this:
```json
{ "pad.modals.connected": "Connecté."
, "pad.modals.uderdup": "Ouvrir dans une nouvelle fenêtre."
, "pad.toolbar.unindent.title": "Dèsindenter"
, "pad.toolbar.undo.title": "Annuler (Ctrl-Z)"
, "timeslider.pageTitle": "{{appTitle}} Curseur temporel"
, ...
[source,json]
----
{
"pad.modals.connected": "Connecté.",
"pad.modals.uderdup": "Ouvrir dans une nouvelle fenêtre.",
"pad.toolbar.unindent.title": "Dèsindenter",
"pad.toolbar.undo.title": "Annuler (Ctrl-Z)",
"timeslider.pageTitle": "{{appTitle}} Curseur temporel",
...
}
```
----
Each translation consists of a key (the id of the string that is to be translated) and the translated string. Terms in curly braces must not be touched but left as they are, since they represent a dynamically changing part of the string like a variable. Imagine a message welcoming a user: `Welcome, {{userName}}!` would be translated as `Ahoy, {{userName}}!` in pirate.
### Client-side
We use a `language` cookie to save your language settings if you change them. If you don't, we autodetect your locale using information from your browser. Then, the preferred language is fed into a library called [html10n.js](https://github.com/marcelklehr/html10n.js), which loads the appropriate translations and applies them to our templates. Its features include translation params, pluralization, include rules and a nice javascript API.
==== Client-side
We use a `language` cookie to save your language settings if you change them. If you don't, we autodetect your locale using information from your browser. Then, the preferred language is fed into a library called https://github.com/marcelklehr/html10n.js[html10n.js], which loads the appropriate translations and applies them to our templates. Its features include translation params, pluralization, include rules and a nice javascript API.
## Localizing plugins
=== Localizing plugins
### 1. Mark the strings to translate
==== 1. Mark the strings to translate
In the template files of your plugin, change all hardcoded messages/strings...
from:
```html
[source,html]
----
<option value="0">Heading 1</option>
```
----
to:
```html
[source,html]
----
<option data-l10n-id="ep_heading.h1" value="0"></option>
```
----
In the javascript files of your plugin, change all hardcoded messages/strings...
from:
```js
alert ('Chat');
```
to:
```js
alert(window._('pad.chat'));
```
### 2. Create translate files in the locales directory of your plugin
* The name of the file must be the language code of the language it contains translations for (see [supported lang codes](https://joker-x.github.com/languages4translatewiki/test/); e.g. en ? English, es ? Spanish...)
[source,js]
----
alert ('Chat');
----
to:
[source,js]
----
alert(window._('pad.chat'));
----
==== 2. Create translate files in the locales directory of your plugin
* The name of the file must be the language code of the language it contains translations for (see https://joker-x.github.io/languages4translatewiki/test/[supported lang codes]; e.g. en ? English, es ? Spanish...)
* The extension of the file must be `.json`
* The default language is English, so your plugin should always provide `en.json`
* In order to avoid naming conflicts, your message keys should start with the name of your plugin followed by a dot (see below)
*ep_your-plugin/locales/en.json*
```
{ "ep_your-plugin.h1": "Heading 1"
[source, json]
----
{
"ep_your-plugin.h1": "Heading 1"
}
```
----
*ep_your-plugin/locales/es.json*
```
{ "ep_your-plugin.h1": "Título 1"
[source, json]
----
{
"ep_your-plugin.h1": "Título 1"
}
```
----
Every time the http server is started, it will auto-detect your messages and merge them automatically with the core messages.
### Overwrite core messages
==== Overwrite core messages
You can overwrite Etherpad's core messages in your plugin's locale files.
For example, if you want to replace `Chat` with `Notes`, simply add...
*ep_your-plugin/locales/en.json*
```
{ "ep_your-plugin.h1": "Heading 1"
, "pad.chat": "Notes"
[source,json]
----
{
"ep_your-plugin.h1": "Heading 1",
"pad.chat": "Notes"
}
```
----
## Customization for Administrators
=== Customization for Administrators
As an Etherpad administrator, it is possible to overwrite core mesages as well as messages in plugins. These include error messages, labels, and user instructions. Whereas the localization in the source code is in separate files separated by locale, an administrator's custom localizations are in `settings.json` under the `customLocaleStrings` key, with each locale separated by a sub-key underneath.
As an Etherpad administrator, it is possible to overwrite core messages as well as messages in plugins. These include error messages, labels, and user instructions. Whereas the localization in the source code is in separate files separated by locale, an administrator's custom localizations are in `settings.json` under the `customLocaleStrings` key, with each locale separated by a sub-key underneath.
For example, let's say you want to change the text on the "New Pad" button on Etherpad's home page. If you look in `locales/en.json` (or `locales/en-gb.json`) you'll see the key for this text is `"index.newPad"`. You could add the following to `settings.json`:
```
[source,json]
----
"customLocaleStrings": {
"fr": {
"index.newPad": "Créer un document"
@ -111,4 +131,4 @@ For example, let's say you want to change the text on the "New Pad" button on Et
"index.newPad": "Create a document"
}
}
```
----

253
doc/plugins.adoc Normal file
View File

@ -0,0 +1,253 @@
== Plugins
Etherpad allows you to extend its functionality with plugins. A plugin registers
hooks (functions) for certain events (thus certain features) in Etherpad to
execute its own functionality based on these events.
Publicly available plugins can be found in the npm registry (see
<https://npmjs.org>). Etherpad's naming convention for plugins is to prefix your
plugins with `ep_`. So, e.g. it's `ep_flubberworms`. Thus you can install
plugins from npm, using `npm install --no-save --legacy-peer-deps
ep_flubberworm` in Etherpad's root directory.
You can also browse to `http://yourEtherpadInstan.ce/admin/plugins`, which will
list all installed plugins and those available on npm. It even provides
functionality to search through all available plugins.
=== Folder structure
Ideally a plugin has the following folder structure:
[source]
----
ep_<plugin>/
├ .github/
│ └ workflows/
│ └ npmpublish.yml ◄─ GitHub workflow to auto-publish on push
├ static/
│ ├ css/ ◄─ static .css files
│ ├ images/ ◄─ static image files
│ ├ js/
│ │ └ index.js ◄─ static client-side code
│ └ tests/
│ ├ backend/
│ │ └ specs/ ◄─ backend (server) tests
│ └ frontend/
│ └ specs/ ◄─ frontend (client) tests
├ templates/ ◄─ EJS templates (.html, .js, .css, etc.)
├ locales/
│ ├ en.json ◄─ English (US) strings
│ └ qqq.json ◄─ optional hints for translators
├ .travis.yml ◄─ Travis CI config
├ LICENSE
├ README.md
├ ep.json ◄─ Etherpad plugin definition
├ index.js ◄─ server-side code
├ package.json
└ package-lock.json
----
If your plugin includes client-side hooks, put them in `static/js/`. If you're
adding in CSS or image files, you should put those files in `static/css/ `and
`static/image/`, respectively, and templates go into `templates/`. Translations
go into `locales/`. Tests go in `static/tests/backend/specs/` and
`static/tests/frontend/specs/`.
A Standard directory structure like this makes it easier to navigate through
your code. That said, do note, that this is not actually *required* to make your
plugin run. If you want to make use of our i18n system, you need to put your
translations into `locales/`, though, in order to have them integrated. (See
"Localization" for more info on how to localize your plugin.)
=== Plugin definition
Your plugin definition goes into `ep.json`. In this file you register your hook
functions, indicate the parts of your plugin and the order of execution. (A
documentation of all available events to hook into can be found in chapter
<<Server-side hooks>>.)
[source,json]
----
{
"parts": [
{
"name": "nameThisPartHoweverYouWant",
"hooks": {
"authenticate": "ep_<plugin>/<file>:functionName1",
"expressCreateServer": "ep_<plugin>/<file>:functionName2"
},
"client_hooks": {
"acePopulateDOMLine": "ep_<plugin>/<file>:functionName3"
}
}
]
}
----
A hook function registration maps a hook name to a hook function specification.
The hook function specification looks like `ep_example/file.js:functionName`. It
consists of two parts separated by a colon: a module name to `require()` and the
name of a function exported by the named module. See
https://nodejs.org/docs/latest/api/modules.html#modules_module_exports[`module.exports`]
for how to export a function.
For the module name you can omit the `.js` suffix, and if the file is `index.js`
you can use just the directory name. You can also omit the module name entirely,
in which case it defaults to the plugin name (e.g., `ep_example`).
You can also omit the function name. If you do, Etherpad will look for an
exported function whose name matches the name of the hook (e.g.,
`authenticate`).
If either the module name or the function name is omitted (or both), the colon
may also be omitted unless the provided module name contains a colon. (So if the
module name is `C:\foo.js` then the hook function specification with the
function name omitted would be `"C:\\foo.js:"`.)
Examples: Suppose the plugin name is `ep_example`. All of the following are
equivalent, and will cause the `authorize` hook to call the `exports.authorize`
function in `index.js` from the `ep_example` plugin:
* `"authorize": "ep_example/index.js:authorize"`
* `"authorize": "ep_example/index.js:"`
* `"authorize": "ep_example/index.js"`
* `"authorize": "ep_example/index:authorize"`
* `"authorize": "ep_example/index:"`
* `"authorize": "ep_example/index"`
* `"authorize": "ep_example:authorize"`
* `"authorize": "ep_example:"`
* `"authorize": "ep_example"`
* `"authorize": ":authorize"`
* `"authorize": ":"`
* `"authorize": ""`
==== Client hooks and server hooks
There are server hooks, which will be executed on the server (e.g.
`expressCreateServer`), and there are client hooks, which are executed on the
client (e.g. `acePopulateDomLine`). Be sure to not make assumptions about the
environment your code is running in, e.g. don't try to access `process`, if you
know your code will be run on the client, and likewise, don't try to access
`window` on the server...
==== Styling
When you install a client-side plugin (e.g. one that implements at least one
client-side hook), the plugin name is added to the `class` attribute of the div
`#editorcontainerbox` in the main window. This gives you the opportunity of
tuning the appearance of the main UI in your plugin.
For example, this is the markup with no plugins installed:
[source,html]
----
<div id="editorcontainerbox" class="">
----
and this is the contents after installing `someplugin`:
[source,html]
----
<div id="editorcontainerbox" class="ep_someplugin">
----
This feature was introduced in Etherpad **1.8**.
==== Parts
As your plugins become more and more complex, you will find yourself in the need
to manage dependencies between plugins. E.g. you want the hooks of a certain
plugin to be executed before (or after) yours. You can also manage these
dependencies in your plugin definition file `ep.json`:
[source,json]
----
{
"parts": [
{
"name": "onepart",
"pre": [],
"post": ["ep_onemoreplugin/partone"],
"hooks": {
"storeBar": "ep_monospace/plugin:storeBar",
"getFoo": "ep_monospace/plugin:getFoo"
}
},
{
"name": "otherpart",
"pre": ["ep_my_example/somepart", "ep_otherplugin/main"],
"post": [],
"hooks": {
"someEvent": "ep_my_example/otherpart:someEvent",
"another": "ep_my_example/otherpart:another"
}
}
]
}
----
Usually a plugin will add only one functionality at a time, so it will probably
only use one `part` definition to register its hooks. However, sometimes you
have to put different (unrelated) functionalities into one plugin. For this you
will want use parts, so other plugins can depend on them.
===== pre/post
The `"pre"` and `"post"` definitions, affect the order in which parts of a
plugin are executed. This ensures that plugins and their hooks are executed in
the correct order.
`"pre"` lists parts that must be executed *before* the defining part. `"post"`
lists parts that must be executed *after* the defining part.
You can, on a basic level, think of this as double-ended dependency listing. If
you have a dependency on another plugin, you can make sure it loads before yours
by putting it in `"pre"`. If you are setting up things that might need to be
used by a plugin later, you can ensure proper order by putting it in `"post"`.
Note that it would be far more sane to use `"pre"` in almost any case, but if
you want to change config variables for another plugin, or maybe modify its
environment, `"post"` could definitely be useful.
Also, note that dependencies should *also* be listed in your package.json, so
they can be `npm install`'d automagically when your plugin gets installed.
=== Package definition
Your plugin must also contain a https://docs.npmjs.com/files/package.json[package definition
file], called package.json, in the
project root - this file contains various metadata relevant to your plugin, such
as the name and version number, author, project hompage, contributors, a short
description, etc. If you publish your plugin on npm, these metadata are used for
package search etc., but it's necessary for Etherpad plugins, even if you don't
publish your plugin.
[source,json]
----
{
"name": "ep_PLUGINNAME",
"version": "0.0.1",
"description": "DESCRIPTION",
"author": "USERNAME (REAL NAME) <MAIL@EXAMPLE.COM>",
"contributors": [],
"dependencies": {"MODULE": "0.3.20"},
"engines": {"node": ">=12.17.0"}
}
----
=== Templates
If your plugin adds or modifies the front end HTML (e.g. adding buttons or
changing their functions), you should put the necessary HTML code for such
operations in `templates/`, in files of type ".ejs", since Etherpad uses EJS for
HTML templating. See the following link for more information about EJS:
<https://github.com/visionmedia/ejs>.
=== Writing and running front-end tests for your plugin
Etherpad allows you to easily create front-end tests for plugins.
1. Create a new folder: `%your_plugin%/static/tests/frontend/specs`
2. Put your spec file in there. (Example spec files are visible in
`%etherpad_root_folder%/frontend/tests/specs`.)
3. Visit http://yourserver.com/frontend/tests and your front-end tests will run.

View File

@ -1,135 +0,0 @@
# Plugins
Etherpad allows you to extend its functionality with plugins. A plugin registers hooks (functions) for certain events (thus certain features) in Etherpad-lite to execute its own functionality based on these events.
Publicly available plugins can be found in the npm registry (see <https://npmjs.org>). Etherpad-lite's naming convention for plugins is to prefix your plugins with `ep_`. So, e.g. it's `ep_flubberworms`. Thus you can install plugins from npm, using `npm install ep_flubberworm` in etherpad-lite's root directory.
You can also browse to `http://yourEtherpadInstan.ce/admin/plugins`, which will list all installed plugins and those available on npm. It even provides functionality to search through all available plugins.
## Folder structure
A basic plugin usually has the following folder structure:
```
ep_<plugin>/
| static/
| templates/
| locales/
+ ep.json
+ package.json
```
If your plugin includes client-side hooks, put them in `static/js/`. If you're adding in CSS or image files, you should put those files in `static/css/ `and `static/image/`, respectively, and templates go into `templates/`. Translations go into `locales/`
A Standard directory structure like this makes it easier to navigate through your code. That said, do note, that this is not actually *required* to make your plugin run. If you want to make use of our i18n system, you need to put your translations into `locales/`, though, in order to have them integrated. (See "Localization" for more info on how to localize your plugin)
## Plugin definition
Your plugin definition goes into `ep.json`. In this file you register your hooks, indicate the parts of your plugin and the order of execution. (A documentation of all available events to hook into can be found in chapter [hooks](#all_hooks).)
A hook registration is a pairs of a hook name and a function reference (filename to require() + exported function name)
```json
{
"parts": [
{
"name": "nameThisPartHoweverYouWant",
"hooks": {
"authenticate" : "ep_<plugin>/<file>:FUNCTIONNAME1",
"expressCreateServer": "ep_<plugin>/<file>:FUNCTIONNAME2"
},
"client_hooks": {
"acePopulateDOMLine": "ep_plugin/<file>:FUNCTIONNAME3"
}
}
]
}
```
Etherpad-lite will expect the part of the hook definition before the colon to be a javascript file and will try to require it. The part after the colon is expected to be a valid function identifier of that module. So, you have to export your hooks, using [`module.exports`](https://nodejs.org/docs/latest/api/modules.html#modules_modules) and register it in `ep.json` as `ep_<plugin>/path/to/<file>:FUNCTIONNAME`.
You can omit the `FUNCTIONNAME` part, if the exported function has got the same name as the hook. So `"authorize" : "ep_flubberworm/foo"` will call the function `exports.authorize` in `ep_flubberworm/foo.js`
### Client hooks and server hooks
There are server hooks, which will be executed on the server (e.g. `expressCreateServer`), and there are client hooks, which are executed on the client (e.g. `acePopulateDomLine`). Be sure to not make assumptions about the environment your code is running in, e.g. don't try to access `process`, if you know your code will be run on the client, and likewise, don't try to access `window` on the server...
### Styling
When you install a client-side plugin (e.g. one that implements at least one client-side hook), the plugin name is added to the `class` attribute of the div `#editorcontainerbox` in the main window.
This gives you the opportunity of tuning the appearance of the main UI in your plugin.
For example, this is the markup with no plugins installed:
```html
<div id="editorcontainerbox" class="">
```
and this is the contents after installing `someplugin`:
```html
<div id="editorcontainerbox" class="ep_someplugin">
```
This feature was introduced in Etherpad **1.8**.
### Parts
As your plugins become more and more complex, you will find yourself in the need to manage dependencies between plugins. E.g. you want the hooks of a certain plugin to be executed before (or after) yours. You can also manage these dependencies in your plugin definition file `ep.json`:
```json
{
"parts": [
{
"name": "onepart",
"pre": [],
"post": ["ep_onemoreplugin/partone"]
"hooks": {
"storeBar": "ep_monospace/plugin:storeBar",
"getFoo": "ep_monospace/plugin:getFoo",
}
},
{
"name": "otherpart",
"pre": ["ep_my_example/somepart", "ep_otherplugin/main"],
"post": [],
"hooks": {
"someEvent": "ep_my_example/otherpart:someEvent",
"another": "ep_my_example/otherpart:another"
}
}
]
}
```
Usually a plugin will add only one functionality at a time, so it will probably only use one `part` definition to register its hooks. However, sometimes you have to put different (unrelated) functionalities into one plugin. For this you will want use parts, so other plugins can depend on them.
#### pre/post
The `"pre"` and `"post"` definitions, affect the order in which parts of a plugin are executed. This ensures that plugins and their hooks are executed in the correct order.
`"pre"` lists parts that must be executed *before* the defining part. `"post"` lists parts that must be executed *after* the defining part.
You can, on a basic level, think of this as double-ended dependency listing. If you have a dependency on another plugin, you can make sure it loads before yours by putting it in `"pre"`. If you are setting up things that might need to be used by a plugin later, you can ensure proper order by putting it in `"post"`.
Note that it would be far more sane to use `"pre"` in almost any case, but if you want to change config variables for another plugin, or maybe modify its environment, `"post"` could definitely be useful.
Also, note that dependencies should *also* be listed in your package.json, so they can be `npm install`'d automagically when your plugin gets installed.
## Package definition
Your plugin must also contain a [package definition file](https://docs.npmjs.com/files/package.json), called package.json, in the project root - this file contains various metadata relevant to your plugin, such as the name and version number, author, project hompage, contributors, a short description, etc. If you publish your plugin on npm, these metadata are used for package search etc., but it's necessary for Etherpad-lite plugins, even if you don't publish your plugin.
```json
{
"name": "ep_PLUGINNAME",
"version": "0.0.1",
"description": "DESCRIPTION",
"author": "USERNAME (REAL NAME) <MAIL@EXAMPLE.COM>",
"contributors": [],
"dependencies": {"MODULE": "0.3.20"},
"engines": { "node": ">= 10.13.0"}
}
```
## Templates
If your plugin adds or modifies the front end HTML (e.g. adding buttons or changing their functions), you should put the necessary HTML code for such operations in `templates/`, in files of type ".ejs", since Etherpad uses EJS for HTML templating. See the following link for more information about EJS: <https://github.com/visionmedia/ejs>.
## Writing and running front-end tests for your plugin
Etherpad allows you to easily create front-end tests for plugins.
1. Create a new folder
```
%your_plugin%/static/tests/frontend/specs
```
2. Put your spec file in here (Example spec files are visible in %etherpad_root_folder%/frontend/tests/specs)
3. Visit http://yourserver.com/frontend/tests your front-end tests will run.

View File

@ -1,4 +1,4 @@
# Skins
== Skins
You can customize Etherpad appearance using skins.
A skin is a directory located under `static/skins/<skin_name>`, with the following contents:

View File

@ -1,4 +1,5 @@
# Statistics
== Statistics
Etherpad keeps track of the goings-on inside the edit machinery. If you'd like to have a look at this, just point your browser to `/stats`.
We currently measure:
@ -13,6 +14,6 @@ We currently measure:
- http500 (meter)
- memoryUsage (gauge)
Under the hood, we are happy to rely on [measured](https://github.com/felixge/node-measured) for all our metrics needs.
Under the hood, we are happy to rely on https://github.com/felixge/node-measured[measured] for all our metrics needs.
To modify or simply access our stats in your plugin, simply `require('ep_etherpad-lite/stats')` which is a [`measured.Collection`](https://yaorg.github.io/node-measured/packages/measured-core/Collection.html).
To modify or simply access our stats in your plugin, simply `require('ep_etherpad-lite/stats')` which is a https://yaorg.github.io/node-measured/packages/measured-core/Collection.html[`measured.Collection`].

View File

@ -1,23 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>__SECTION__ - Etherpad v__VERSION__ Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body class="apidoc" id="api-section-__FILENAME__">
<header id="header">
<h1>Etherpad v__VERSION__ Manual &amp; Documentation</h1>
</header>
<div id="toc">
<h2>Table of Contents</h2>
__TOC__
</div>
<div id="apicontent">
__CONTENT__
</div>
</body>
</html>

58
make_docs.js Normal file
View File

@ -0,0 +1,58 @@
const { exec } = require('child_process');
const fs = require('fs')
const path = require('path')
const pjson = require('./src/package.json')
const VERSION=pjson.version
console.log(`Building docs for version ${VERSION}`)
const createDirIfNotExists = (dir) => {
if (!fs.existsSync(dir)){
fs.mkdirSync(dir)
}
}
function copyFolderSync(from, to) {
if(fs.existsSync(to)){
const stat = fs.lstatSync(to)
if (stat.isDirectory()){
fs.rmSync(to, { recursive: true })
}
else{
fs.rmSync(to)
}
}
fs.mkdirSync(to);
fs.readdirSync(from).forEach(element => {
if (fs.lstatSync(path.join(from, element)).isFile()) {
fs.copyFileSync(path.join(from, element), path.join(to, element))
} else {
copyFolderSync(path.join(from, element), path.join(to, element))
}
});
}
exec('asciidoctor -v', (err,stdout)=>{
if (err){
console.log('Please install asciidoctor')
console.log('https://asciidoctor.org/docs/install-toolchain/')
process.exit(1)
}
});
createDirIfNotExists('./out')
createDirIfNotExists('./out/doc')
createDirIfNotExists('./out/doc/api')
exec(`asciidoctor -D out/doc doc/index.adoc */**.adoc -a VERSION=${VERSION}`)
exec(`asciidoctor -D out/doc/api ./doc/api/*.adoc -a VERSION=${VERSION}`)
copyFolderSync('./doc/easysync', './out/doc/easysync')
copyFolderSync('./doc/assets', './out/doc/assets')
copyFolderSync('./doc/easysync', './out/doc/easysync')
copyFolderSync('./doc/images', './out/doc/images')

1
node_modules/ep_etherpad-lite generated vendored Symbolic link
View File

@ -0,0 +1 @@
../src

View File

@ -24,6 +24,31 @@
*
* This is useful, for example, when running in a Docker container.
*
* DETAILED RULES:
* - If the environment variable is set to the string "true" or "false", the
* value becomes Boolean true or false.
* - If the environment variable is set to the string "null", the value
* becomes null.
* - If the environment variable is set to the string "undefined", the setting
* is removed entirely, except when used as the member of an array in which
* case it becomes null.
* - If the environment variable is set to a string representation of a finite
* number, the string is converted to that number.
* - If the environment variable is set to any other string, including the
* empty string, the value is that string.
* - If the environment variable is unset and a default value is provided, the
* value is as if the environment variable was set to the provided default:
* - "${UNSET_VAR:}" becomes the empty string.
* - "${UNSET_VAR:foo}" becomes the string "foo".
* - "${UNSET_VAR:true}" and "${UNSET_VAR:false}" become true and false.
* - "${UNSET_VAR:null}" becomes null.
* - "${UNSET_VAR:undefined}" causes the setting to be removed (or be set
* to null, if used as a member of an array).
* - If the environment variable is unset and no default value is provided,
* the value becomes null. THIS BEHAVIOR MAY CHANGE IN A FUTURE VERSION OF
* ETHERPAD; if you want the default value to be null, you should explicitly
* specify "null" as the default value.
*
* EXAMPLE:
* "port": "${PORT:9001}"
* "minify": "${MINIFY}"
@ -80,10 +105,12 @@
"title": "${TITLE:Etherpad}",
/*
* favicon default name
* alternatively, set up a fully specified Url to your own favicon
* Pathname of the favicon you want to use. If null, the skin's favicon is
* used if one is provided by the skin, otherwise the default Etherpad favicon
* is used. If this is a relative path it is interpreted as relative to the
* Etherpad root directory.
*/
"favicon": "${FAVICON:favicon.ico}",
"favicon": "${FAVICON:null}",
/*
* Skin name.
@ -171,7 +198,7 @@
*
*
* Database specific settings are dependent on dbType, and go in dbSettings.
* Remember that since Etherpad 1.6.0 you can also store these informations in
* Remember that since Etherpad 1.6.0 you can also store this information in
* credentials.json.
*
* For a complete list of the supported drivers, please refer to:
@ -180,13 +207,15 @@
"dbType": "${DB_TYPE:dirty}",
"dbSettings": {
"host": "${DB_HOST}",
"port": "${DB_PORT}",
"database": "${DB_NAME}",
"user": "${DB_USER}",
"password": "${DB_PASS}",
"charset": "${DB_CHARSET}",
"filename": "${DB_FILENAME:var/dirty.db}"
"host": "${DB_HOST:undefined}",
"port": "${DB_PORT:undefined}",
"database": "${DB_NAME:undefined}",
"user": "${DB_USER:undefined}",
"password": "${DB_PASS:undefined}",
"charset": "${DB_CHARSET:undefined}",
"filename": "${DB_FILENAME:var/dirty.db}",
"collection": "${DB_COLLECTION:undefined}",
"url": "${DB_URL:undefined}"
},
/*
@ -205,12 +234,12 @@
"showChat": "${PAD_OPTIONS_SHOW_CHAT:true}",
"showLineNumbers": "${PAD_OPTIONS_SHOW_LINE_NUMBERS:true}",
"useMonospaceFont": "${PAD_OPTIONS_USE_MONOSPACE_FONT:false}",
"userName": "${PAD_OPTIONS_USER_NAME:false}",
"userColor": "${PAD_OPTIONS_USER_COLOR:false}",
"userName": "${PAD_OPTIONS_USER_NAME:null}",
"userColor": "${PAD_OPTIONS_USER_COLOR:null}",
"rtl": "${PAD_OPTIONS_RTL:false}",
"alwaysShowChat": "${PAD_OPTIONS_ALWAYS_SHOW_CHAT:false}",
"chatAndUsers": "${PAD_OPTIONS_CHAT_AND_USERS:false}",
"lang": "${PAD_OPTIONS_LANG:en-gb}"
"lang": "${PAD_OPTIONS_LANG:null}"
},
/*
@ -260,12 +289,6 @@
*/
"editOnly": "${EDIT_ONLY:false}",
/*
* If set to true, those users who have a valid session will automatically be
* granted access to password protected pads.
*/
"sessionNoPassword": "${SESSION_NO_PASSWORD:false}",
/*
* If true, all css & js will be minified before sending to the client.
*
@ -289,7 +312,7 @@
* it to null disables Abiword and will only allow plain text and HTML
* import/exports.
*/
"abiword": "${ABIWORD}",
"abiword": "${ABIWORD:null}",
/*
* This is the absolute path to the soffice executable.
@ -297,7 +320,7 @@
* LibreOffice can be used in lieu of Abiword to export pads.
* Setting it to null disables LibreOffice exporting.
*/
"soffice": "${SOFFICE}",
"soffice": "${SOFFICE:null}",
/*
* Path to the Tidy executable.
@ -305,7 +328,7 @@
* Tidy is used to improve the quality of exported pads.
* Setting it to null disables Tidy.
*/
"tidyHtml": "${TIDY_HTML}",
"tidyHtml": "${TIDY_HTML:null}",
/*
* Allow import of file types other than the supported ones:
@ -336,6 +359,87 @@
*/
"trustProxy": "${TRUST_PROXY:false}",
/*
* Settings controlling the session cookie issued by Etherpad.
*/
"cookie": {
/*
* How often (in milliseconds) the key used to sign the express_sid cookie
* should be rotated. Long rotation intervals reduce signature verification
* overhead (because there are fewer historical keys to check) and database
* load (fewer historical keys to store, and less frequent queries to
* get/update the keys). Short rotation intervals are slightly more secure.
*
* Multiple Etherpad processes sharing the same database (table) is
* supported as long as the clock sync error is significantly less than this
* value.
*
* Key rotation can be disabled (not recommended) by setting this to 0 or
* null, or by disabling session expiration (see sessionLifetime).
*/
// 86400000 = 1d * 24h/d * 60m/h * 60s/m * 1000ms/s
"keyRotationInterval": "${COOKIE_KEY_ROTATION_INTERVAL:86400000}",
/*
* Value of the SameSite cookie property. "Lax" is recommended unless
* Etherpad will be embedded in an iframe from another site, in which case
* this must be set to "None". Note: "None" will not work (the browser will
* not send the cookie to Etherpad) unless https is used to access Etherpad
* (either directly or via a reverse proxy with "trustProxy" set to true).
*
* "Strict" is not recommended because it has few security benefits but
* significant usability drawbacks vs. "Lax". See
* https://stackoverflow.com/q/41841880 for discussion.
*/
"sameSite": "${COOKIE_SAME_SITE:Lax}",
/*
* How long (in milliseconds) after navigating away from Etherpad before the
* user is required to log in again. (The express_sid cookie is set to
* expire at time now + sessionLifetime when first created, and its
* expiration time is periodically refreshed to a new now + sessionLifetime
* value.) If requireAuthentication is false then this value does not really
* matter.
*
* The "best" value depends on your users' usage patterns and the amount of
* convenience you desire. A long lifetime is more convenient (users won't
* have to log back in as often) but has some drawbacks:
* - It increases the amount of state kept in the database.
* - It might weaken security somewhat: The cookie expiration is refreshed
* indefinitely without consulting authentication or authorization
* hooks, so once a user has accessed a pad, the user can continue to
* use the pad until the user leaves for longer than sessionLifetime.
* - More historical keys (sessionLifetime / keyRotationInterval) must be
* checked when verifying signatures.
*
* Session lifetime can be set to infinity (not recommended) by setting this
* to null or 0. Note that if the session does not expire, most browsers
* will delete the cookie when the browser exits, but a session record is
* kept in the database forever.
*/
// 864000000 = 10d * 24h/d * 60m/h * 60s/m * 1000ms/s
"sessionLifetime": "${COOKIE_SESSION_LIFETIME:864000000}",
/*
* How long (in milliseconds) before the expiration time of an active user's
* session is refreshed (to now + sessionLifetime). This setting affects the
* following:
* - How often a new session expiration time will be written to the
* database.
* - How often each user's browser will ping the Etherpad server to
* refresh the expiration time of the session cookie.
*
* High values reduce the load on the database and the load from browsers,
* but can shorten the effective session lifetime if Etherpad is restarted
* or the user navigates away.
*
* Automatic session refreshes can be disabled (not recommended) by setting
* this to null.
*/
// 86400000 = 1d * 24h/d * 60m/h * 60s/m * 1000ms/s
"sessionRefreshInterval": "${COOKIE_SESSION_REFRESH_INTERVAL:86400000}"
},
/*
* Privacy: disable IP logging
*/
@ -391,10 +495,22 @@
},
/*
* Users for basic authentication.
* User accounts. These accounts are used by:
* - default HTTP basic authentication if no plugin handles authentication
* - some but not all authentication plugins
* - some but not all authorization plugins
*
* is_admin = true gives access to /admin.
* If you do not uncomment this, /admin will not be available!
* User properties:
* - password: The user's password. Some authentication plugins will ignore
* this.
* - is_admin: true gives access to /admin. Defaults to false. If you do not
* uncomment this, /admin will not be available!
* - readOnly: If true, this user will not be able to create new pads or
* modify existing pads. Defaults to false.
* - canCreate: If this is true and readOnly is false, this user can create
* new pads. Defaults to true.
*
* Authentication and authorization plugins may define additional properties.
*
* WARNING: passwords should not be stored in plaintext in this file.
* If you want to mitigate this, please install ep_hash_auth and
@ -405,13 +521,13 @@
"admin": {
// 1) "password" can be replaced with "hash" if you install ep_hash_auth
// 2) please note that if password is null, the user will not be created
"password": "${ADMIN_PASSWORD}",
"password": "${ADMIN_PASSWORD:null}",
"is_admin": true
},
"user": {
// 1) "password" can be replaced with "hash" if you install ep_hash_auth
// 2) please note that if password is null, the user will not be created
"password": "${USER_PASSWORD}",
"password": "${USER_PASSWORD:null}",
"is_admin": false
}
},
@ -421,6 +537,17 @@
*/
"socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"],
"socketIo": {
/*
* Maximum permitted client message size (in bytes). All messages from
* clients that are larger than this will be rejected. Large values make it
* possible to paste large amounts of text, and plugins may require a larger
* value to work properly, but increasing the value increases susceptibility
* to denial of service attacks (malicious clients can exhaust memory).
*/
"maxHttpBufferSize": "${SOCKETIO_MAX_HTTP_BUFFER_SIZE:10000}"
},
/*
* Allow Load Testing tools to hit the Etherpad Instance.
*
@ -428,6 +555,11 @@
*/
"loadTest": "${LOAD_TEST:false}",
/**
* Disable dump of objects preventing a clean exit
*/
"dumpOnUncleanExit": "${DUMP_ON_UNCLEAN_EXIT:false}",
/*
* Disable indentation on new line when previous line ends with some special
* chars (':', '[', '(', '{')
@ -462,6 +594,22 @@
*/
"importMaxFileSize": "${IMPORT_MAX_FILE_SIZE:52428800}", // 50 * 1024 * 1024
/*
* From Etherpad 1.8.5 onwards, when Etherpad is in production mode commits from individual users are rate limited
*
* The default is to allow at most 10 changes per IP in a 1 second window.
* After that the change is rejected.
*
* See https://github.com/animir/node-rate-limiter-flexible/wiki/Overall-example#websocket-single-connection-prevent-flooding for more options
*/
"commitRateLimiting": {
// duration of the rate limit window (seconds)
"duration": "${COMMIT_RATE_LIMIT_DURATION:1}",
// maximum number of changes per IP to allow during the rate limit window
"points": "${COMMIT_RATE_LIMIT_POINTS:10}"
},
/*
* Toolbar buttons configuration.
*
@ -501,58 +649,14 @@
*/
"loglevel": "${LOGLEVEL:INFO}",
/*
* Logging configuration. See log4js documentation for further information:
* https://github.com/nomiddlename/log4js-node
*
* You can add as many appenders as you want here.
*/
"logconfig" :
{ "appenders": [
{ "type": "console"
//, "category": "access"// only logs pad access
}
/*
, { "type": "file"
, "filename": "your-log-file-here.log"
, "maxLogSize": 1024
, "backups": 3 // how many log files there're gonna be at max
//, "category": "test" // only log a specific category
}
*/
/*
, { "type": "logLevelFilter"
, "level": "warn" // filters out all log messages that have a lower level than "error"
, "appender":
{ Use whatever appender you want here }
}
*/
/*
, { "type": "logLevelFilter"
, "level": "error" // filters out all log messages that have a lower level than "error"
, "appender":
{ "type": "smtp"
, "subject": "An error occurred in your EPL instance!"
, "recipients": "bar@blurdybloop.com, baz@blurdybloop.com"
, "sendInterval": 300 // 60 * 5 = 5 minutes -- will buffer log messages; set to 0 to send a mail for every message
, "transport": "SMTP", "SMTP": { // see https://github.com/andris9/Nodemailer#possible-transport-methods
"host": "smtp.example.com", "port": 465,
"secureConnection": true,
"auth": {
"user": "foo@example.com",
"pass": "bar_foo"
}
}
}
}
*/
]
}, // logconfig
/* Override any strings found in locale directories */
"customLocaleStrings": {}
"customLocaleStrings": {},
/* Disable Admin UI tests */
"enableAdminUITests": false,
/*
* Enable/Disable case-insensitive pad names.
*/
"lowerCasePadIds": "${LOWER_CASE_PAD_IDS:false}"
}

View File

@ -15,6 +15,31 @@
*
* This is useful, for example, when running in a Docker container.
*
* DETAILED RULES:
* - If the environment variable is set to the string "true" or "false", the
* value becomes Boolean true or false.
* - If the environment variable is set to the string "null", the value
* becomes null.
* - If the environment variable is set to the string "undefined", the setting
* is removed entirely, except when used as the member of an array in which
* case it becomes null.
* - If the environment variable is set to a string representation of a finite
* number, the string is converted to that number.
* - If the environment variable is set to any other string, including the
* empty string, the value is that string.
* - If the environment variable is unset and a default value is provided, the
* value is as if the environment variable was set to the provided default:
* - "${UNSET_VAR:}" becomes the empty string.
* - "${UNSET_VAR:foo}" becomes the string "foo".
* - "${UNSET_VAR:true}" and "${UNSET_VAR:false}" become true and false.
* - "${UNSET_VAR:null}" becomes null.
* - "${UNSET_VAR:undefined}" causes the setting to be removed (or be set
* to null, if used as a member of an array).
* - If the environment variable is unset and no default value is provided,
* the value becomes null. THIS BEHAVIOR MAY CHANGE IN A FUTURE VERSION OF
* ETHERPAD; if you want the default value to be null, you should explicitly
* specify "null" as the default value.
*
* EXAMPLE:
* "port": "${PORT:9001}"
* "minify": "${MINIFY}"
@ -71,10 +96,12 @@
"title": "Etherpad",
/*
* favicon default name
* alternatively, set up a fully specified Url to your own favicon
* Pathname of the favicon you want to use. If null, the skin's favicon is
* used if one is provided by the skin, otherwise the default Etherpad favicon
* is used. If this is a relative path it is interpreted as relative to the
* Etherpad root directory.
*/
"favicon": "favicon.ico",
"favicon": null,
/*
* Skin name.
@ -162,7 +189,7 @@
*
*
* Database specific settings are dependent on dbType, and go in dbSettings.
* Remember that since Etherpad 1.6.0 you can also store these informations in
* Remember that since Etherpad 1.6.0 you can also store this information in
* credentials.json.
*
* For a complete list of the supported drivers, please refer to:
@ -208,12 +235,12 @@
"showChat": true,
"showLineNumbers": true,
"useMonospaceFont": false,
"userName": false,
"userColor": false,
"userName": null,
"userColor": null,
"rtl": false,
"alwaysShowChat": false,
"chatAndUsers": false,
"lang": "en-gb"
"lang": null
},
/*
@ -263,12 +290,6 @@
*/
"editOnly": false,
/*
* If set to true, those users who have a valid session will automatically be
* granted access to password protected pads.
*/
"sessionNoPassword": false,
/*
* If true, all css & js will be minified before sending to the client.
*
@ -339,6 +360,84 @@
*/
"trustProxy": false,
/*
* Settings controlling the session cookie issued by Etherpad.
*/
"cookie": {
/*
* How often (in milliseconds) the key used to sign the express_sid cookie
* should be rotated. Long rotation intervals reduce signature verification
* overhead (because there are fewer historical keys to check) and database
* load (fewer historical keys to store, and less frequent queries to
* get/update the keys). Short rotation intervals are slightly more secure.
*
* Multiple Etherpad processes sharing the same database (table) is
* supported as long as the clock sync error is significantly less than this
* value.
*
* Key rotation can be disabled (not recommended) by setting this to 0 or
* null, or by disabling session expiration (see sessionLifetime).
*/
"keyRotationInterval": 86400000, // = 1d * 24h/d * 60m/h * 60s/m * 1000ms/s
/*
* Value of the SameSite cookie property. "Lax" is recommended unless
* Etherpad will be embedded in an iframe from another site, in which case
* this must be set to "None". Note: "None" will not work (the browser will
* not send the cookie to Etherpad) unless https is used to access Etherpad
* (either directly or via a reverse proxy with "trustProxy" set to true).
*
* "Strict" is not recommended because it has few security benefits but
* significant usability drawbacks vs. "Lax". See
* https://stackoverflow.com/q/41841880 for discussion.
*/
"sameSite": "Lax",
/*
* How long (in milliseconds) after navigating away from Etherpad before the
* user is required to log in again. (The express_sid cookie is set to
* expire at time now + sessionLifetime when first created, and its
* expiration time is periodically refreshed to a new now + sessionLifetime
* value.) If requireAuthentication is false then this value does not really
* matter.
*
* The "best" value depends on your users' usage patterns and the amount of
* convenience you desire. A long lifetime is more convenient (users won't
* have to log back in as often) but has some drawbacks:
* - It increases the amount of state kept in the database.
* - It might weaken security somewhat: The cookie expiration is refreshed
* indefinitely without consulting authentication or authorization
* hooks, so once a user has accessed a pad, the user can continue to
* use the pad until the user leaves for longer than sessionLifetime.
* - More historical keys (sessionLifetime / keyRotationInterval) must be
* checked when verifying signatures.
*
* Session lifetime can be set to infinity (not recommended) by setting this
* to null or 0. Note that if the session does not expire, most browsers
* will delete the cookie when the browser exits, but a session record is
* kept in the database forever.
*/
"sessionLifetime": 864000000, // = 10d * 24h/d * 60m/h * 60s/m * 1000ms/s
/*
* How long (in milliseconds) before the expiration time of an active user's
* session is refreshed (to now + sessionLifetime). This setting affects the
* following:
* - How often a new session expiration time will be written to the
* database.
* - How often each user's browser will ping the Etherpad server to
* refresh the expiration time of the session cookie.
*
* High values reduce the load on the database and the load from browsers,
* but can shorten the effective session lifetime if Etherpad is restarted
* or the user navigates away.
*
* Automatic session refreshes can be disabled (not recommended) by setting
* this to null.
*/
"sessionRefreshInterval": 86400000 // = 1d * 24h/d * 60m/h * 60s/m * 1000ms/s
},
/*
* Privacy: disable IP logging
*/
@ -394,10 +493,22 @@
},
/*
* Users for basic authentication.
* User accounts. These accounts are used by:
* - default HTTP basic authentication if no plugin handles authentication
* - some but not all authentication plugins
* - some but not all authorization plugins
*
* is_admin = true gives access to /admin.
* If you do not uncomment this, /admin will not be available!
* User properties:
* - password: The user's password. Some authentication plugins will ignore
* this.
* - is_admin: true gives access to /admin. Defaults to false. If you do not
* uncomment this, /admin will not be available!
* - readOnly: If true, this user will not be able to create new pads or
* modify existing pads. Defaults to false.
* - canCreate: If this is true and readOnly is false, this user can create
* new pads. Defaults to true.
*
* Authentication and authorization plugins may define additional properties.
*
* WARNING: passwords should not be stored in plaintext in this file.
* If you want to mitigate this, please install ep_hash_auth and
@ -426,6 +537,17 @@
*/
"socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"],
"socketIo": {
/*
* Maximum permitted client message size (in bytes). All messages from
* clients that are larger than this will be rejected. Large values make it
* possible to paste large amounts of text, and plugins may require a larger
* value to work properly, but increasing the value increases susceptibility
* to denial of service attacks (malicious clients can exhaust memory).
*/
"maxHttpBufferSize": 10000
},
/*
* Allow Load Testing tools to hit the Etherpad Instance.
*
@ -433,6 +555,11 @@
*/
"loadTest": false,
/**
* Disable dump of objects preventing a clean exit
*/
"dumpOnUncleanExit": false,
/*
* Disable indentation on new line when previous line ends with some special
* chars (':', '[', '(', '{')
@ -467,21 +594,8 @@
*/
"importMaxFileSize": 52428800, // 50 * 1024 * 1024
/*
* From Etherpad 1.8.3 onwards import was restricted to authors who had
* content within the pad.
*
* This setting will override that restriction and allow any user to import
* without the requirement to add content to a pad.
*
* This setting is useful for when you use a plugin for authentication so you
* can already trust each user.
*/
"allowAnyoneToImport": false,
/*
* From Etherpad 1.9.0 onwards, when Etherpad is in production mode commits from individual users are rate limited
* From Etherpad 1.8.5 onwards, when Etherpad is in production mode commits from individual users are rate limited
*
* The default is to allow at most 10 changes per IP in a 1 second window.
* After that the change is rejected.
@ -492,11 +606,10 @@
// duration of the rate limit window (seconds)
"duration": 1,
// maximum number of chanes per IP to allow during the rate limit window
// maximum number of changes per IP to allow during the rate limit window
"points": 10
},
/*
* Toolbar buttons configuration.
*
@ -536,58 +649,14 @@
*/
"loglevel": "INFO",
/*
* Logging configuration. See log4js documentation for further information:
* https://github.com/nomiddlename/log4js-node
*
* You can add as many appenders as you want here.
*/
"logconfig" :
{ "appenders": [
{ "type": "console"
//, "category": "access"// only logs pad access
}
/*
, { "type": "file"
, "filename": "your-log-file-here.log"
, "maxLogSize": 1024
, "backups": 3 // how many log files there're gonna be at max
//, "category": "test" // only log a specific category
}
*/
/*
, { "type": "logLevelFilter"
, "level": "warn" // filters out all log messages that have a lower level than "error"
, "appender":
{ Use whatever appender you want here }
}
*/
/*
, { "type": "logLevelFilter"
, "level": "error" // filters out all log messages that have a lower level than "error"
, "appender":
{ "type": "smtp"
, "subject": "An error occurred in your EPL instance!"
, "recipients": "bar@blurdybloop.com, baz@blurdybloop.com"
, "sendInterval": 300 // 60 * 5 = 5 minutes -- will buffer log messages; set to 0 to send a mail for every message
, "transport": "SMTP", "SMTP": { // see https://github.com/andris9/Nodemailer#possible-transport-methods
"host": "smtp.example.com", "port": 465,
"secureConnection": true,
"auth": {
"user": "foo@example.com",
"pass": "bar_foo"
}
}
}
}
*/
]
}, // logconfig
/* Override any strings found in locale directories */
"customLocaleStrings": {}
"customLocaleStrings": {},
/* Disable Admin UI tests */
"enableAdminUITests": false,
/*
* Enable/Disable case-insensitive pad names.
*/
"lowerCasePadIds": false
}

141
src/.eslintrc.cjs Normal file
View File

@ -0,0 +1,141 @@
'use strict';
// This is a workaround for https://github.com/eslint/eslint/issues/3458
require('eslint-config-etherpad/patch/modern-module-resolution');
module.exports = {
ignorePatterns: [
'/static/js/admin/jquery.autosize.js',
'/static/js/admin/minify.json.js',
'/static/js/vendors/browser.js',
'/static/js/vendors/farbtastic.js',
'/static/js/vendors/gritter.js',
'/static/js/vendors/html10n.js',
'/static/js/vendors/jquery.js',
'/static/js/vendors/nice-select.js',
'/tests/frontend/lib/',
],
overrides: [
{
files: [
'**/.eslintrc.*',
],
extends: 'etherpad/node',
},
{
files: [
'**/*',
],
excludedFiles: [
'**/.eslintrc.*',
'tests/frontend/**/*',
],
extends: 'etherpad/node',
},
{
files: [
'static/**/*',
'tests/frontend/helper.js',
'tests/frontend/helper/**/*',
],
excludedFiles: [
'**/.eslintrc.*',
],
extends: 'etherpad/browser',
env: {
'shared-node-browser': true,
},
overrides: [
{
files: [
'tests/frontend/helper/**/*',
],
globals: {
helper: 'readonly',
},
},
],
},
{
files: [
'tests/**/*',
],
excludedFiles: [
'**/.eslintrc.*',
'tests/frontend/cypress/**/*',
'tests/frontend/helper.js',
'tests/frontend/helper/**/*',
'tests/frontend/travis/**/*',
'tests/ratelimit/**/*',
],
extends: 'etherpad/tests',
rules: {
'mocha/no-exports': 'off',
'mocha/no-top-level-hooks': 'off',
},
},
{
files: [
'tests/backend/**/*',
],
excludedFiles: [
'**/.eslintrc.*',
],
extends: 'etherpad/tests/backend',
overrides: [
{
files: [
'tests/backend/**/*',
],
excludedFiles: [
'tests/backend/specs/**/*',
],
rules: {
'mocha/no-exports': 'off',
'mocha/no-top-level-hooks': 'off',
},
},
],
},
{
files: [
'tests/frontend/**/*',
],
excludedFiles: [
'**/.eslintrc.*',
'tests/frontend/cypress/**/*',
'tests/frontend/helper.js',
'tests/frontend/helper/**/*',
'tests/frontend/travis/**/*',
],
extends: 'etherpad/tests/frontend',
overrides: [
{
files: [
'tests/frontend/**/*',
],
excludedFiles: [
'tests/frontend/specs/**/*',
],
rules: {
'mocha/no-exports': 'off',
'mocha/no-top-level-hooks': 'off',
},
},
],
},
{
files: [
'tests/frontend/cypress/**/*',
],
extends: 'etherpad/tests/cypress',
},
{
files: [
'tests/frontend/travis/**/*',
],
extends: 'etherpad/node',
},
],
root: true,
};

View File

@ -14,7 +14,7 @@ rm -rf ${DIST}
mkdir -p ${DIST}/
rm -rf ${SRC}
rsync -a bin/deb-src/ ${SRC}/
rsync -a src/bin/deb-src/ ${SRC}/
mkdir -p ${SYSROOT}/opt/
rsync --exclude '.git' -a . ${SYSROOT}/opt/etherpad/ --delete

62
src/bin/buildForWindows.sh Executable file
View File

@ -0,0 +1,62 @@
#!/bin/sh
set -e
pecho() { printf %s\\n "$*"; }
log() { pecho "$@"; }
error() { log "ERROR: $@" >&2; }
fatal() { error "$@"; exit 1; }
try() { "$@" || fatal "'$@' failed"; }
is_cmd() { command -v "$@" >/dev/null 2>&1; }
for x in git unzip wget zip; do
is_cmd "${x}" || fatal "Please install ${x}"
done
# Move to the folder where Etherpad is checked out
try cd "${0%/*}"
workdir=$(try git rev-parse --show-toplevel) || exit 1
try cd "${workdir}"
[ -f src/package.json ] || fatal "failed to cd to etherpad root directory"
# See https://github.com/msys2/MSYS2-packages/issues/1216
export MSYSTEM=winsymlinks:lnk
OUTPUT=${workdir}/etherpad-win.zip
TMP_FOLDER=$(try mktemp -d) || exit 1
trap 'exit 1' HUP INT TERM
trap 'log "cleaning up..."; try cd / && try rm -rf "${TMP_FOLDER}"' EXIT
log "create a clean environment in $TMP_FOLDER..."
try export GIT_WORK_TREE=${TMP_FOLDER}; git checkout HEAD -f \
|| fatal "failed to copy etherpad to temporary folder"
try mkdir "${TMP_FOLDER}"/.git
try git rev-parse HEAD >${TMP_FOLDER}/.git/HEAD
try cp -r ./src/node_modules "${TMP_FOLDER}"/src/node_modules
try cd "${TMP_FOLDER}"
[ -f src/package.json ] || fatal "failed to copy etherpad to temporary folder"
# setting NODE_ENV=production ensures that dev dependencies are not installed,
# making the windows package smaller
export NODE_ENV=production
log "do a normal unix install first..."
try ./src/bin/installDeps.sh
log "copy the windows settings template..."
try cp settings.json.template settings.json
log "resolve symbolic links..."
try cp -rL node_modules node_modules_resolved
try rm -rf node_modules
try mv node_modules_resolved node_modules
log "download windows node..."
try wget "https://nodejs.org/dist/latest-v16.x/win-x64/node.exe" -O node.exe
log "create the zip..."
try zip -9 -r "${OUTPUT}" ./*
log "Finished. You can find the zip at ${OUTPUT}"

27
src/bin/checkAllPads.js Normal file
View File

@ -0,0 +1,27 @@
'use strict';
/*
* This is a debug tool. It checks all revisions for data corruption
*/
// As of v14, Node.js does not exit when there is an unhandled Promise rejection. Convert an
// unhandled rejection into an uncaught exception, which does cause Node.js to exit.
process.on('unhandledRejection', (err) => { throw err; });
if (process.argv.length !== 2) throw new Error('Use: node src/bin/checkAllPads.js');
(async () => {
const db = require('../node/db/DB');
await db.init();
const padManager = require('../node/db/PadManager');
await Promise.all((await padManager.listAllPads()).padIDs.map(async (padId) => {
const pad = await padManager.getPad(padId);
try {
await pad.check();
} catch (err) {
console.error(`Error in pad ${padId}: ${err.stack || err}`);
return;
}
console.log(`Pad ${padId}: OK`);
}));
console.log('Finished.');
})();

20
src/bin/checkPad.js Normal file
View File

@ -0,0 +1,20 @@
'use strict';
/*
* This is a debug tool. It checks all revisions for data corruption
*/
// As of v14, Node.js does not exit when there is an unhandled Promise rejection. Convert an
// unhandled rejection into an uncaught exception, which does cause Node.js to exit.
process.on('unhandledRejection', (err) => { throw err; });
if (process.argv.length !== 3) throw new Error('Use: node src/bin/checkPad.js $PADID');
const padId = process.argv[2];
(async () => {
const db = require('../node/db/DB');
await db.init();
const padManager = require('../node/db/PadManager');
if (!await padManager.doesPadExists(padId)) throw new Error('Pad does not exist');
const pad = await padManager.getPad(padId);
await pad.check();
console.log('Finished.');
})();

View File

@ -1,12 +1,11 @@
#!/bin/sh
#Move to the folder where ep-lite is installed
cd $(dirname $0)
# Move to the Etherpad base directory.
MY_DIR=$(cd "${0%/*}" && pwd -P) || exit 1
cd "${MY_DIR}/../.." || exit 1
#Was this script started in the bin folder? if yes move out
if [ -d "../bin" ]; then
cd "../"
fi
# Source constants and useful functions
. src/bin/functions.sh
ignoreRoot=0
for ARG in "$@"
@ -32,10 +31,9 @@ fi
rm -rf src/node_modules
#Prepare the environment
bin/installDeps.sh "$@" || exit 1
src/bin/installDeps.sh "$@" || exit 1
#Move to the node folder and start
echo "Started Etherpad..."
echo "Starting Etherpad..."
SCRIPTPATH=$(pwd -P)
node "${SCRIPTPATH}/node_modules/ep_etherpad-lite/node/server.js" "$@"
exec node src/node/server.js "$@"

View File

@ -134,7 +134,7 @@ function create_builds {
git clone $ETHER_WEB_REPO
echo "Creating windows build..."
cd etherpad-lite
bin/buildForWindows.sh
src/bin/buildForWindows.sh
[[ $? != 0 ]] && echo "Aborting: Error creating build for windows" && exit 1
echo "Creating docs..."
make docs
@ -145,12 +145,12 @@ function push_builds {
cd $TMP_DIR/etherpad-lite/
echo "Copying windows build and docs to website repo..."
GIT_SHA=$(git rev-parse HEAD | cut -c1-10)
mv etherpad-lite-win.zip $TMP_DIR/ether.github.com/downloads/etherpad-lite-win-$VERSION-$GIT_SHA.zip
mv etherpad-win.zip $TMP_DIR/ether.github.com/downloads/etherpad-win-$VERSION-$GIT_SHA.zip
mv out/doc $TMP_DIR/ether.github.com/doc/v$VERSION
cd $TMP_DIR/ether.github.com/
sed -i "s/etherpad-lite-win.*\.zip/etherpad-lite-win-$VERSION-$GIT_SHA.zip/" index.html
sed -i "s/etherpad-win.*\.zip/etherpad-win-$VERSION-$GIT_SHA.zip/" index.html
sed -i "s/$LATEST_GIT_TAG/$VERSION/g" index.html
git checkout -b release_$VERSION
[[ $? != 0 ]] && echo "Aborting: Error creating new release branch" && exit 1

View File

@ -1,21 +1,25 @@
'use strict';
/*
* A tool for generating a test user session which can be used for debugging configs
* that require sessions.
*/
const m = (f) => __dirname + '/../' + f;
// As of v14, Node.js does not exit when there is an unhandled Promise rejection. Convert an
// unhandled rejection into an uncaught exception, which does cause Node.js to exit.
process.on('unhandledRejection', (err) => { throw err; });
const fs = require('fs');
const path = require('path');
const querystring = require('querystring');
const request = require(m('src/node_modules/request'));
const settings = require(m('src/node/utils/Settings'));
const supertest = require(m('src/node_modules/supertest'));
const settings = require('../node/utils/Settings');
const supertest = require('supertest');
(async () => {
const api = supertest('http://'+settings.ip+':'+settings.port);
const api = supertest(`http://${settings.ip}:${settings.port}`);
const filePath = path.join(__dirname, '../APIKEY.txt');
const apikey = fs.readFileSync(filePath, {encoding: 'utf-8'});
const filePath = path.join(__dirname, '../../APIKEY.txt');
const apikey = fs.readFileSync(filePath, {encoding: 'utf-8'});
let res;
@ -43,5 +47,5 @@ const supertest = require(m('src/node_modules/supertest'));
res = await api.post(uri('createSession', {apikey, groupID, authorID, validUntil}));
if (res.body.code === 1) throw new Error(`Error creating session: ${res.body}`);
console.log('Session made: ====> create a cookie named sessionID and set the value to',
res.body.data.sessionID);
res.body.data.sessionID);
})();

View File

@ -15,12 +15,12 @@ pre-start script
chown $EPUSER $EPLOGS ||true
chmod 0755 $EPLOGS ||true
chown -R $EPUSER $EPHOME/var ||true
$EPHOME/bin/installDeps.sh >> $EPLOGS/error.log || { stop; exit 1; }
$EPHOME/src/bin/installDeps.sh >> $EPLOGS/error.log || { stop; exit 1; }
end script
script
cd $EPHOME/
exec su -s /bin/sh -c 'exec "$0" "$@"' $EPUSER -- node node_modules/ep_etherpad-lite/node/server.js \
exec su -s /bin/sh -c 'exec "$0" "$@"' $EPUSER -- node src/node/server.js \
>> $EPLOGS/access.log \
2>> $EPLOGS/error.log
echo "Etherpad is running on http://localhost:9001 - To change settings edit /opt/etherpad/settings.json"

View File

@ -1,10 +1,14 @@
#!/bin/sh
# Move to the folder where ep-lite is installed
cd "$(dirname "$0")"/..
# Move to the Etherpad base directory.
MY_DIR=$(cd "${0%/*}" && pwd -P) || exit 1
cd "${MY_DIR}/../.." || exit 1
# Source constants and useful functions
. src/bin/functions.sh
# Prepare the environment
bin/installDeps.sh || exit 1
src/bin/installDeps.sh || exit 1
echo "If you are new to debugging Node.js with Chrome DevTools, take a look at this page:"
echo "https://medium.com/@paul_irish/debugging-node-js-nightlies-with-chrome-devtools-7c4a1b95ae27"
@ -12,4 +16,4 @@ echo "Open 'chrome://inspect' on Chrome to start debugging."
# Use 0.0.0.0 to allow external connections to the debugger
# (ex: running Etherpad on a docker container). Use default port # (9229)
node --inspect=0.0.0.0:9229 node_modules/ep_etherpad-lite/node/server.js "$@"
exec node --inspect=0.0.0.0:9229 src/node/server.js "$@"

Some files were not shown because too many files have changed in this diff Show More