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
Richard Hansen
fd9b770579
PadManager: Refactor padList
to avoid duplicate loads
2022-01-02 20:44:42 -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
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
Richard Hansen
b1d0848701
Pad: Improve readability of appendText
2021-12-16 00:48:07 -05:00