Commit graph

383 commits

Author SHA1 Message Date
SamTV12345
8a1a03eca1
Fixed ueberdb2 build. (#6533) 2024-07-22 21:28:52 +02:00
SamTV12345
94985923a7
Removed comments in settings test. (#6431)
* Removed comments in settings test.

* Fixed admin tests.
2024-06-05 21:36:05 +02:00
reallylowest
ed1c5dd184
chore: remove repetitive words (#6290)
Signed-off-by: reallylowest <sunjinping@outlook.com>
2024-04-01 16:47:51 +02:00
SamTV12345
db46ffb63b
Feat/admin react (#6211)
* Added vite react admin ui.

* Added react i18next.

* Added pads manager.

* Fixed docker build.

* Fixed windows build.

* Fixed installOnWindows script.

* Install only if path exists.
2024-03-09 23:07:09 +01:00
SamTV12345
d34b964cc2
Fixed frontend tests. (#6210)
* Fixed frontend tests.

* Use old socket io syntax.

* uSE ESM:

* Remove padvar.

* Remove cypress.
2024-03-08 18:50:29 +01:00
SamTV12345
295a2a758b
Added backend in typescript. (#6185) 2024-02-23 19:48:55 +01:00
SamTV12345
4bd27a1c79
Moved more classes to ts. (#6179) 2024-02-22 11:36:43 +01:00
SamTV12345
ead3c0ea38
Added typescript to etherpad
* Fixed determining file extension.

* Added ts-node

* Fixed backend tests.

* Fixed frontend test runs.

* Fixed tests.

* Use script approach for starting etherpad.

* Change directory to src.

* Fixed env.

* Change directory

* Fixed build arg.

* Fixed docker build.

* Fixed.

* Fixed cypress file path.

* Fixed.

* Use latest node container.

* Fixed windows workflow.

* Use tsx and optimized docker image.

* Added workflow for type checks.

* Fixed.

* Added tsconfig.

* Converted more files to typescript.

* Removed commented keys.

* Typed caching middleware.

* Added script for checking the types.

* Moved SecretRotator to typescript.

* Fixed npm installation and moved to types folder.

* Use better scripts for watching typescript changes.

* Update windows.yml

* Fixed order of npm installation.

* Converted i18n.

* Added more types.

* Added more types.

* Fixed import.

* Fixed tests.

* Fixed tests.

* Fixed type checking test.

* Fixed stats

* Added express types.

* fixed.
2024-02-05 21:13:02 +01:00
SamTV12345
ff1b929eb2
Added jsdoc for the node part of etherpad. (#5983) 2023-10-17 12:49:56 +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
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
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
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
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
Richard Hansen
b733ed9ab0 Pad: Convert line endings in text from padDefaultContent hook 2022-02-24 17:40:04 -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
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
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