Commit graph

1888 commits

Author SHA1 Message Date
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
efdf9dbe36
Fixed session key rotation problem with a default empty array on null value. (#5896) 2023-08-29 18:00:14 +02:00
avkarenow
89201632ca
Call exports.start() for Phusion Passenger (#5866) 2023-08-08 14:03:50 +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
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
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
SamTV12345
6ee4d3daaa Fixed password with only numbers being rejected. 2023-07-02 17:48:16 +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
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
Chocobozzz
f456606015 Prevent infinite loop when exiting 2023-06-20 14:13:24 +01:00
webzwo0i
ed5e8997d7 Fix: Plugin locales should overwrite core's locales 2023-06-20 13:51:01 +01: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
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
10206d9e25 DB: Clean up database initialization 2022-05-05 05:18:53 -04: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
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
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
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